veg / hyphy-analyses

HyPhy standalone analyses
MIT License
39 stars 17 forks source link

two runs for the same hyphy relax command, but the results are different #62

Open aaannaw opened 3 days ago

aaannaw commented 3 days ago

Dear author, For some genes, when I first run the hyphy relax command: /data/01/p1/user157/software/hyphy/bin/hyphy relax --alignment /data/01/p1/user157/Bathyergidae-sociaty/2024812.newcactus/03.proteincoding-selected-analysis/01.getgene/07.deletestopcodon/evm.model.ptg000026l.297.fa --tree /data/01/p1/user157/Bathyergidae-sociaty/2024812.newcactus/03.proteincoding-selected-analysis/01.getgene/13.hyphy/02.relax/00.mark.tree/evm.model.ptg000026l.297.fa.treefile.mark --test FG1 --reference FG2 --output /data/01/p1/user157/Bathyergidae-sociaty/2024812.newcactus/03.proteincoding-selected-analysis/01.getgene/13.hyphy/02.relax/01.socialtest.relax.out/evm.model.ptg000026l.297.json > /data/01/p1/user157/Bathyergidae-sociaty/2024812.newcactus/03.proteincoding-selected-analysis/01.getgene/13.hyphy/02.relax/01.socialtest.relax.out/evm.model.ptg000026l.297.log 2>&1

The error occurs in the log file:

Error:
Internal error 
Constrained optimization failed, since a starting point within the domain specified for the variables couldn't be found.
Set it by hand, or check your constraints for compatibility.
Failed constraint: relax.ge.omega2:=1/0.3652980831447958 must be in [0,10000]. Current value = 1.

Then I rerun the the same command, the error disappears and the dN/dS distribution for models is shown in the log file:

### Fitting the alternative model to test K != 1
* Log(L) =  -941.31, AIC-c =  1969.90 (42 estimated parameters)
* Relaxation/intensification parameter (K) =     0.01
* The following rate distribution was inferred for **test** branches

|          Selection mode           |     dN/dS     |Proportion, %|               Notes               |
|-----------------------------------|---------------|-------------|-----------------------------------|
|        Negative selection         |     0.976     |   39.361    |                                   |
|        Negative selection         |     0.976     |   37.942    |       Collapsed rate class        |
|         Neutral evolution         |     1.000     |   22.697    |       Collapsed rate class        |

* The following rate distribution was inferred for **reference** branches

|          Selection mode           |     dN/dS     |Proportion, %|               Notes               |
|-----------------------------------|---------------|-------------|-----------------------------------|
|        Negative selection         |     0.045     |   39.361    |                                   |
|        Negative selection         |     0.088     |   37.942    |                                   |
|         Neutral evolution         |     1.000     |   22.697    |                                   |

The difference for two runs is obvious and which result could I trust?

The input files are attached.

Could you give me any suggestions? Looking forward with your reply.

Best wishes, Na Wan evm.model.ptg000026l.297.json evm.model.ptg000026l.297.log evm.model.ptg000026l.297.fa.treefile.mark.txt evm.model.ptg000026l.297.fa.txt