veg / hyphy

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

Failed to dereference error with FitMG94 and the local option #1718

Closed Percud closed 3 months ago

Percud commented 3 months ago

Hi,

I have a recent cmake installation of hyphy

./hyphy --version
HYPHY 2.5.62(MP) for Linux on x86_64 x86 AVX SIMD with FMA3 zlib (v1.2.11)

I am interested in getting Confidence Intervals of omega estimates, and I tried to replicate your example in: https://github.com/veg/hyphy/issues/1659#issuecomment-1788985968 with the CD2.nex dataset

However, I receive the error below. It runs smoothly with --type global

./hyphy ./tests/hbltests/libv3/support/FitMG94.bf --alignment ./tests/hbltests/data/CD2.nex --type local

Analysis Description
--------------------
Fit an MG94xREV model with several selectable options frequency
estimator and report the fit results including dN/dS ratios, and
synonymous and non-synonymous branch lengths. v0.2 adds LRT test for
dN/dS != 1

- __Requirements__: in-frame codon alignment and a phylogenetic tree

- __Written by__: Sergei L Kosakovsky Pond

- __Contact Information__: spond@temple.edu

- __Analysis Version__: 0.2

rooted: No

>code => Universal
>Loaded a multiple sequence alignment with **10** sequences, **187** codons, and **1** partitions from `/home/ric/INSTALLAZIONI/hyphy/./tests/hbltests/data/CD2.nex`

>type => local

>frequencies => CF3x4

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

>kill-zero-lengths => Yes
* Log(L) = -3532.32, AIC-c =  7112.86 (24 estimated parameters)
* 1 partition. Total tree length by partition (subs/site)  1.694

### Fitting Standard MG94
* Log(L) = -3450.58, AIC-c =  6995.54 (46 estimated parameters)
Error:
Failed to dereference 'PIG.{
 "empirical":9,
 "global":{
   "Substitution rate from nucleotide A to nucleotide C":"rxehbjcd.model_MGREV.theta_AC",
   "Substitution rate from nucleotide A to nucleotide G":"rxehbjcd.model_MGREV.theta_AG",
   "Substitution rate from nucleotide A to nucleotide T":"rxehbjcd.model_MGREV.theta_AT",
   "Substitution rate from nucleotide C to nucleotide G":"rxehbjcd.model_MGREV.theta_CG",
   "Substitution rate from nucleotide C to nucleotide T":"rxehbjcd.model_MGREV.theta_CT",
   "Substitution rate from nucleotide G to nucleotide T":"rxehbjcd.model_MGREV.theta_GT"
  },
 "local":{
   "non-synonymous rate":"beta",
   "synonymous rate":"alpha"
  }
}.null'
        While computing: ^(usmTwgyN.alphaName)

Function call stack
1 :  [namespace = usmTwgyN] saveAlpha=^alphaName;
-------
2 :  [namespace = UYnGpaAb] result[_branch_name]=Call(callback,tree_name,_branch_name,(model_descriptions[map[_branch_name]])[utility.getGlobalValue("terms.parameters")],i);
-------
3 :  estimators.TraverseLocalParameters(fitter.results[terms.likelihood_function],fitter.results[utility.getGlobalValue("terms.model")],"profile_ci");
-------
spond commented 3 months ago

Dear @Percud,

Please use the FitMG94.bf file from https://github.com/veg/hyphy-analyses/ The one in the test directory is out of date and no longer works with the current HyPhy version. I'll check to see why not

Best, Sergei

Percud commented 3 months ago

This worked, Thank you.