Skip to content

MD_CAT is crashing #7

@fvfreitas

Description

@fvfreitas

Dear colleagues,
I ran MD-CAT a few weeks ago using fossil calibrations and it worked fine. However, when I tried to rerun my analyses today using the same computer, it gave the following error:
Traceback (most recent call last): File "/home/felipe/miniconda3/bin/md_cat.py", line 3, in <module> from emd.emd_normal_lib import * File "/home/felipe/miniconda3/lib/python3.11/site-packages/emd/emd_normal_lib.py", line 12, in <module> from simulator.multinomial import * File "/home/felipe/miniconda3/lib/python3.11/site-packages/simulator/multinomial.py", line 3, in <module> import scipy.stats File "/home/felipe/miniconda3/lib/python3.11/site-packages/scipy/stats/__init__.py", line 610, in <module> from ._stats_py import * File "/home/felipe/miniconda3/lib/python3.11/site-packages/scipy/stats/_stats_py.py", line 49, in <module> from . import distributions File "/home/felipe/miniconda3/lib/python3.11/site-packages/scipy/stats/distributions.py", line 10, in <module> from . import _continuous_distns File "/home/felipe/miniconda3/lib/python3.11/site-packages/scipy/stats/_continuous_distns.py", line 12, in <module> from scipy.interpolate import BSpline File "/home/felipe/miniconda3/lib/python3.11/site-packages/scipy/interpolate/__init__.py", line 167, in <module> from ._interpolate import * File "/home/felipe/miniconda3/lib/python3.11/site-packages/scipy/interpolate/_interpolate.py", line 12, in <module> from . import _fitpack_py File "/home/felipe/miniconda3/lib/python3.11/site-packages/scipy/interpolate/_fitpack_py.py", line 8, in <module> from ._fitpack_impl import bisplrep, bisplev, dblint # noqa: F401 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/felipe/miniconda3/lib/python3.11/site-packages/scipy/interpolate/_fitpack_impl.py", line 103, in <module> 'iwrk': array([], dfitpack_int), 'u': array([], float), ^^^^^^^^^^^^^^^^^^^^^^^ TypeError

After I updated all the conda packages in the environment I was using, the analyses started, but a few seconds later, they crashed with the following error, even when using the files in the use_cases folder.

`EMDate was called as follow: ../../md_cat.py -i input.nwk -o output.nwk -p 1 -v
Solving EM with init point + 1
Random seed: 9140
Initialized EM
EM iteration 0
Initial likelihood: 531.2802182748981
EM iteration 1
Mstep ...
/home/felipe/miniconda3/lib/python3.11/site-packages/cvxpy/reductions/solvers/solving_chain.py:356: FutureWarning:
You specified your problem should be solved by ECOS. Starting in
CXVPY 1.6.0, ECOS will no longer be installed by default with CVXPY.
Please either add ECOS as an explicit install dependency to your project
or switch to our new default solver, Clarabel, by either not specifying a
solver argument or specifying solver=cp.CLARABEL. To suppress this
warning while continuing to use ECOS, you can filter this warning using
Python's ``warnings`` module until you are using 1.6.0.

warnings.warn(ECOS_DEP_DEPRECATION_MSG, FutureWarning)
Traceback (most recent call last):
File "/home/felipe/MD-Cat/use_cases/unit_time_tree/../../md_cat.py", line 86, in
best_tree,best_llh,best_phi,best_omega = MDCat(tree,k,sampling_time=timeFile,s=seqLen,nrep=nreps,maxIter=maxIter,refTree=None,fixed_tau=False,fixed_omega=False,verbose=args["verbose"],pseudo=1,randseed=randseed,place_mu=place_mu,place_q=place_q,init_Q=None,root_time=tR,leaf_time=tL,bw_time=bw_time,as_date=as_date,CI_options=CI_options)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/felipe/MD-Cat/emd/emd_normal_lib.py", line 43, in MDCat
return EM_date_random_init(tree,smpl_times,init_rate_distr,s=s,nrep=nrep,maxIter=maxIter,refTree=refTree,init_Q=init_Q,fixed_tau=fixed_tau,fixed_omega=fixed_omega,verbose=verbose,mu_avg=mu_avg,randseed=randseed,pseudo=pseudo,place_mu=place_mu,place_q=place_q,as_date=as_date,bw_time=bw_time,CI_options=CI_options)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/felipe/MD-Cat/emd/emd_normal_lib.py", line 70, in EM_date_random_init
ans,constr = EM_date(new_tree,smpl_times,init_rate_distr,s=s,maxIter=maxIter,refTree=refTree,init_Q=init_Q,fixed_tau=fixed_tau,verbose=verbose,mu_avg=mu_avg,fixed_omega=fixed_omega,pseudo=pseudo)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/felipe/MD-Cat/emd/emd_normal_lib.py", line 131, in EM_date
next_tau,next_omega = run_Mstep(tree,smpl_times,b,s,omega,tau,phi,Q,M,dt,eps_tau=eps_tau,fixed_tau=fixed_tau,fixed_omega=fixed_omega,mu_avg=mu_avg)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/felipe/MD-Cat/emd/emd_normal_lib.py", line 448, in run_Mstep
omega_star = compute_omega_star(tau_star,Q,b,phi,mu_avg=mu_avg) if not fixed_omega else omega
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/felipe/MD-Cat/emd/emd_normal_lib.py", line 667, in compute_omega_star
N = len(tau)
^^^^^^^^
TypeError: object of type 'NoneType' has no len()`

I hope you can help.

Cheers,
Felipe.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions