veg / hyphy

HyPhy: Hypothesis testing using Phylogenies
http://www.hyphy.org
Other
200 stars 68 forks source link

Error:Failed to dereference #1638

Closed kfuku52 closed 11 months ago

kfuku52 commented 11 months ago

Hello, I installed HyPhy v2.5.50 on macOS via bioconda and utilized FitMG94.bf (latest on GitHub) to calculate local dN/dS values across branches on a small tree. However, I encountered an error. I'd greatly appreciate any advice or suggestions on this issue.

Input data: hyphy_input.zip

command

aln=alignment.fa
tre=tree.nwk
hyphy ENV="USE_MEMORY_SAVING_DATA_STRUCTURES=1e8;" FitMG94.bf --alignment ${aln} --tree ${tre} --type local

errors.log

Error:Failed to dereference 'Arabidopsis_thaliana_AT2G26580_1.{
 "empirical":9,
 "global":{
   "Substitution rate from nucleotide A to nucleotide C":"OWEySrWK.model_MGREV.theta_AC",
   "Substitution rate from nucleotide A to nucleotide G":"OWEySrWK.model_MGREV.theta_AG",
   "Substitution rate from nucleotide A to nucleotide T":"OWEySrWK.model_MGREV.theta_AT",
   "Substitution rate from nucleotide C to nucleotide G":"OWEySrWK.model_MGREV.theta_CG",
   "Substitution rate from nucleotide C to nucleotide T":"OWEySrWK.model_MGREV.theta_CT",
   "Substitution rate from nucleotide G to nucleotide T":"OWEySrWK.model_MGREV.theta_GT"
  },
 "local":{
   "non-synonymous rate":"beta",
   "synonymous rate":"alpha"
  }
}.null'
Failed to dereference 'Arabidopsis_thaliana_AT2G26580_1.{
 "empirical":9,
 "global":{
   "Substitution rate from nucleotide A to nucleotide C":"OWEySrWK.model_MGREV.theta_AC",
   "Substitution rate from nucleotide A to nucleotide G":"OWEySrWK.model_MGREV.theta_AG",
   "Substitution rate from nucleotide A to nucleotide T":"OWEySrWK.model_MGREV.theta_AT",
   "Substitution rate from nucleotide C to nucleotide G":"OWEySrWK.model_MGREV.theta_CG",
   "Substitution rate from nucleotide C to nucleotide T":"OWEySrWK.model_MGREV.theta_CT",
   "Substitution rate from nucleotide G to nucleotide T":"OWEySrWK.model_MGREV.theta_GT"
  },
 "local":{
   "non-synonymous rate":"beta",
   "synonymous rate":"alpha"
  }
}.null'
spond commented 11 months ago

Dear @kfuku52,

I updated FitMG94.bf very recently, but I forgot to bump the HyPhy version requirement. Try with the latest (2.5.52):

hyphy FitMG94.bf --alignment ${aln} --tree ${tre} --type local

....
### Obtaining branch lengths and nucleotide substitution biases under the nucleotide GTR model

>kill-zero-lengths –> Yes
* Log(L) = -8477.30, AIC-c = 17036.86 (41 estimated parameters)
* 1 partition. Total tree length by partition (subs/site)  4.449

### Fitting Standard MG94
* Log(L) = -8011.66, AIC-c = 16186.37 (80 estimated parameters)

### Estimating confidence intervals for dN/dS along each branch

|            Branch            |     Length     |     dN/dS      |Approximate dN/dS CI|
|:----------------------------:|:--------------:|:--------------:|:------------------:|
|Arabidopsis_thaliana_AT2G26...|     0.011      |     0.609      |   0.099 - 1.633    |
|Capsella_rubella_Carub_0004...|     0.078      |     0.071      |   0.026 - 0.146    |
|             n48              |     0.101      |     3.532      |   2.336 - 5.047    |
|Arabidopsis_thaliana_AT1G08...|     0.088      |     0.075      |   0.027 - 0.150    |
|Capsella_rubella_Carub_0001...|     0.012      |10000000000.0...|0.000 - 10000.000...|
|             n51              |     0.273      |     0.177      |   0.120 - 0.249    |
|Utricularia_gibba_unitig_26...|     0.383      |     0.143      |   0.101 - 0.194    |
|             n54              |     0.296      |     0.071      |   0.035 - 0.118    |
|             n57              |     0.222      |     0.111      |   0.048 - 0.190    |
|Arabidopsis_thaliana_AT1G23...|     0.046      |     0.019      |   0.000 - 0.098    |
|Capsella_rubella_Carub_0001...|     0.018      |    850.821     |425.157 - 1472.45...|
|             n63              |    1377.208    |     0.000      |   0.000 - 0.000    |
|Utricularia_gibba_unitig_0_...|     0.617      |     0.392      |   0.322 - 0.473    |
|Utricularia_gibba_unitig_8_...|     0.163      |     0.099      |   0.051 - 0.162    |
|             n18              |     0.087      |     0.160      |   0.060 - 0.295    |
|Utricularia_gibba_unitig_26...|     0.242      |     0.228      |   0.166 - 0.304    |
|Utricularia_gibba_unitig_76...|     0.069      |10000000000.0...|0.000 - 10000.000...|
|             n21              |     0.184      |     0.237      |   0.155 - 0.338    |
|Utricularia_gibba_unitig_74...|     0.197      |     0.214      |   0.148 - 0.294    |
|             n24              |     0.102      |     0.213      |   0.112 - 0.346    |
|             n27              |     0.109      |     0.076      |   0.008 - 0.169    |
|Arabidopsis_thaliana_AT4G00...|     0.023      |     0.425      |   0.164 - 0.832    |
|Capsella_rubella_Carub_0006...|     0.056      |     0.097      |   0.038 - 0.191    |
|             n30              |     0.169      |     0.171      |   0.105 - 0.255    |
|Arabidopsis_thaliana_AT1G69...|     0.009      |     3.714      |   1.171 - 8.340    |
|Capsella_rubella_Carub_0002...|     0.069      |     0.003      |   0.000 - 0.045    |
|             n33              |     0.679      |     0.406      |   0.332 - 0.495    |
|             n36              |     0.022      |10000000000.0...|0.000 - 10000.000...|
|Capsella_rubella_Carub_0004...|     0.035      |     0.143      |   0.052 - 0.291    |
|Arabidopsis_thaliana_AT2G45...|     0.021      |     0.951      |   0.450 - 1.706    |
|             n39              |     0.252      |     0.147      |   0.103 - 0.202    |
|             n42              |     0.030      |10000000000.0...|0.000 - 10000.000...|
|             n45              |     0.379      |     0.108      |   0.067 - 0.157    |

### **Synonymous tree** 
(((Arabidopsis_thaliana_AT2G26580_1:0.00399318043985859,Capsella_rubella_Carub_0004s0684_1:0.06437553518185352)n48:0.008995859356475705,((Arabidopsis_thaliana_AT1G08465_1:0.07193919304906089,Capsella_rubella_Carub_0001s0782_1:0)n51:0.1798770633504294,Utricularia_gibba_unitig_26_g9420_t1:0.270779581788326)n54:0.2454245214985313)n57:0.1680626187958188,(Arabidopsis_thaliana_AT1G23420_1:0.04342962928106019,Capsella_rubella_Carub_0001s2300_1:7.294893963467635e-06)n63:1376.933462349402,(((Utricularia_gibba_unitig_0_g2762_t1:0.2889708733929958,Utricularia_gibba_unitig_8_g3329_t1:0.1267341495816768)n18:0.05946245232471969,((Utricularia_gibba_unitig_26_g8895_t1:0.1456629669957645,Utricularia_gibba_unitig_76_g29081_t1:0)n21:0.1088547052083551,Utricularia_gibba_unitig_749_g13777_t1:0.1216658747150923)n24:0.0628318318363412)n27:0.0891444598872107,(((Arabidopsis_thaliana_AT4G00180_1:0.010139578178739,Capsella_rubella_Carub_0006s3704_1:0.04329070997793546)n30:0.1129599009407981,(Arabidopsis_thaliana_AT1G69180_1:0.0008016483992920099,Capsella_rubella_Carub_0002s1578_1:0.06837414047536004)n33:0.311865660807044)n36:0,(Capsella_rubella_Carub_0004s2781_1:0.0249161895359508,Arabidopsis_thaliana_AT2G45190_1:0.005671904274216364)n39:0.1766975379718495)n42:0)n45:0.2890006950206137)

### **Non-synonymous tree** 
(((Arabidopsis_thaliana_AT2G26580_1:0.007059076219465881,Capsella_rubella_Carub_0004s0684_1:0.01333771977265334)n48:0.09223449816546804,((Arabidopsis_thaliana_AT1G08465_1:0.01563832489091192,Capsella_rubella_Carub_0001s0782_1:0.01175170463280158)n51:0.09262655622585753,Utricularia_gibba_unitig_26_g9420_t1:0.1121316462557292)n54:0.05036642131682636)n57:0.05391708746376728,(Arabidopsis_thaliana_AT1G23420_1:0.002340461750062345,Capsella_rubella_Carub_0001s2300_1:0.01801726565775754)n63:0.2749358769853611,(((Utricularia_gibba_unitig_0_g2762_t1:0.3284480119514008,Utricularia_gibba_unitig_8_g3329_t1:0.03630063291799971)n18:0.02767055174550039,((Utricularia_gibba_unitig_26_g8895_t1:0.09653374207743688,Utricularia_gibba_unitig_76_g29081_t1:0.06858172548445995)n21:0.07483514331883048,Utricularia_gibba_unitig_749_g13777_t1:0.07543969175776073)n24:0.03881786789242766)n27:0.01963085062516593,(((Arabidopsis_thaliana_AT4G00180_1:0.01249975554051956,Capsella_rubella_Carub_0006s3704_1:0.01222258015280288)n30:0.05621114491393955,(Arabidopsis_thaliana_AT1G69180_1:0.00864313656462005,Capsella_rubella_Carub_0002s1578_1:0.0006778880584649665)n33:0.367515662277891)n36:0.02243869338884092,(Capsella_rubella_Carub_0004s2781_1:0.01030741203680698,Arabidopsis_thaliana_AT2G45190_1:0.01565539554822565)n39:0.07552120126057342)n42:0.03035166470479546)n45:0.09043791849002945)
**Combined tree** 
(((Arabidopsis_thaliana_AT2G26580_1:0.01105225665932447,Capsella_rubella_Carub_0004s0684_1:0.07771325495450686)n48:0.1012303575219438,((Arabidopsis_thaliana_AT1G08465_1:0.08757751793997276,Capsella_rubella_Carub_0001s0782_1:0.01175170463280158)n51:0.2725036195762869,Utricularia_gibba_unitig_26_g9420_t1:0.3829112280440553)n54:0.2957909428153576)n57:0.221979706259586,(Arabidopsis_thaliana_AT1G23420_1:0.04577009103112253,Capsella_rubella_Carub_0001s2300_1:0.01802456055172101)n63:1377.208398226387,(((Utricularia_gibba_unitig_0_g2762_t1:0.6174188853443965,Utricularia_gibba_unitig_8_g3329_t1:0.1630347824996765)n18:0.08713300407022002,((Utricularia_gibba_unitig_26_g8895_t1:0.2421967090732014,Utricularia_gibba_unitig_76_g29081_t1:0.06858172548445995)n21:0.1836898485271855,Utricularia_gibba_unitig_749_g13777_t1:0.197105566472853)n24:0.1016496997287688)n27:0.1087753105123766,(((Arabidopsis_thaliana_AT4G00180_1:0.02263933371925858,Capsella_rubella_Carub_0006s3704_1:0.05551329013073839)n30:0.1691710458547377,(Arabidopsis_thaliana_AT1G69180_1:0.009444784963912056,Capsella_rubella_Carub_0002s1578_1:0.06905202853382497)n33:0.6793813230849342)n36:0.02243869338884092,(Capsella_rubella_Carub_0004s2781_1:0.03522360157275774,Arabidopsis_thaliana_AT2G45190_1:0.02132729982244201)n39:0.2522187392324231)n42:0.03035166470479546)n45:0.3794386135106431)

### Writing detailed analysis report to `/Users/sergei/Development/hyphy-analyses/FitMG94/hyphy_input/alignment.fa.FITTER.json'

Best, Sergei

spond commented 11 months ago

P.S. With the newer version you can also apply --lrt Yes to do branch-by-branch tests...

hyphy FitMG94.bf --alignment ${aln} --tree ${tre} --type local --lrt Yes

...
### Running the likelihood ratio tests for dN/dS=1 and estimating confidence intervals for dN/dS along each branch

|            Branch            |     Length     |     dN/dS      |Approximate dN/dS CI|LRT p-value dN != dS|
|:----------------------------:|:--------------:|:--------------:|:------------------:|:------------------:|
|Arabidopsis_thaliana_AT2G26...|     0.011      |     0.611      |   0.100 - 1.640    |       0.1773       |
|Capsella_rubella_Carub_0004...|     0.078      |     0.071      |   0.026 - 0.146    |       0.0013       |
|             n48              |     0.102      |     3.399      |   2.248 - 4.858    |       0.1687       |
|Arabidopsis_thaliana_AT1G08...|     0.088      |     0.075      |   0.027 - 0.150    |       0.0057       |
|Capsella_rubella_Carub_0001...|     0.012      |10000000000.0...|0.000 - 10000.000...|       0.6953       |
|             n51              |     0.272      |     0.177      |   0.120 - 0.249    |       0.0725       |
|Utricularia_gibba_unitig_26...|     0.383      |     0.143      |   0.101 - 0.194    |       0.0031       |
|             n54              |     0.296      |     0.071      |   0.035 - 0.118    |       0.0532       |
|             n57              |     0.221      |     0.111      |   0.048 - 0.191    |       0.5028       |
|Arabidopsis_thaliana_AT1G23...|     0.046      |     0.019      |   0.000 - 0.098    |       0.0297       |
|Capsella_rubella_Carub_0001...|     0.018      |10000000000.0...|0.000 - 10000.000...|       0.8271       |
|             n63              |    1376.788    |     0.000      |   0.000 - 0.000    |       0.0001       |
|Utricularia_gibba_unitig_0_...|     0.617      |     0.391      |   0.322 - 0.473    |       0.0009       |
...
kfuku52 commented 11 months ago

Thank you for the clarification! I'll give the latest version a try.