Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incompatibility with recent numpy version #43

Open
gavinmdouglas opened this issue Mar 19, 2024 · 0 comments
Open

Incompatibility with recent numpy version #43

gavinmdouglas opened this issue Mar 19, 2024 · 0 comments

Comments

@gavinmdouglas
Copy link
Contributor

gavinmdouglas commented Mar 19, 2024

Hi there,

Thanks for developing this method, it is extremely useful and presents a unique twist on traditional dN/dS!

I have a minor comment, which is no longer an issue for myself, but may be helpful to others troubleshooting the same issue.

When running the data from the tutorial with this command (using phydms version 2.4.1):

phydms_comprehensive \
	betaLactamase_tutorial_out/ \
	tutorial/example_data/betaLactamase_alignment.fasta \
	tutorial/example_data/betaLactamase_prefs.csv \
	--raxml raxml

The command failed with this error:

2024-03-19 10:33:15,957 - INFO - Analysis completed for YNGKP_M0
2024-03-19 10:33:15,958 - ERROR - Terminating phydms_comprehensive at Tue Mar 19 10:33:15 2024 with ERROR
Traceback (most recent call last):
  File "/Users/gavin/opt/miniconda3/envs/phydms/bin/phydms_comprehensive", line 349, in main
    raise RuntimeError(
RuntimeError: phydms failed to created expected output file betaLactamase_tutorial_out/YNGKP_M0_tree.newick.

Looking into YNGKP_M5_log.log I saw this more specific error:

2024-03-18 17:12:31,341 - INFO - Adjusted 1 branch lengths up to minbrlen 1e-06

2024-03-18 17:12:31,341 - INFO - Initializing TreeLikelihood..
2024-03-18 17:12:31,355 - ERROR - Terminating phydms at Mon Mar 18 17:12:31 2024 with ERROR
Traceback (most recent call last):
  File "phydms/scripts/phydms", line 405, in main
    tl = phydmslib.treelikelihood.TreeLikelihood(tree, alignment, model)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "phydms/phydmslib/treelikelihood.py", line 303, in __init__
    self.gaps = numpy.array(self.gaps)
                ^^^^^^^^^^^^^^^^^^^^^^
ValueError: setting an array element with a sequence. The requested array has an inhomogeneous shape after 1 dimensions. The detected shape was (50,) + inhomogeneous part.

I believe this is an incompatibility with numpy v1.26.4, as this error disappeared when I downgraded to numpy v1.16.6.

All the best,

Gavin

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant