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

help with Matplotlib error, as called by hclust2 #12

Open
binzo21 opened this issue Jul 3, 2024 · 2 comments
Open

help with Matplotlib error, as called by hclust2 #12

binzo21 opened this issue Jul 3, 2024 · 2 comments

Comments

@binzo21
Copy link

binzo21 commented Jul 3, 2024

Hi- I'm trying to run hclust2 and getting the following error:

Traceback (most recent call last):
File "/project/crml-bio/.conda/envs/hclust2/bin/hclust2.py", line 825, in
hclust2_main()
File "/project/crml-bio/.conda/envs/hclust2/bin/hclust2.py", line 779, in hclust2_main
read = ReadCmd( )
^^^^^^^^^^
File "/project/crml-bio/.conda/envs/hclust2/bin/hclust2.py", line 768, in init
Heatmap.input_parameters( p )
File "/project/crml-bio/.conda/envs/hclust2/bin/hclust2.py", line 518, in input_parameters
pylab.register_cmap(name=n,cmap=my_cmap)
^^^^^^^^^^^^^^^^^^^
AttributeError: module 'pylab' has no attribute 'register_cmap'

Any help or work around for this would be appreciated!

Thanks!
Lindsay

@henryjuho
Copy link

A quick fix for me was to install it into a conda environment with python 2 instead of 3.

conda create --name hclust2 -c bioconda hclust2 python=2

@kristiennelvz
Copy link

kristiennelvz commented Oct 3, 2024

I've just come across this and think this is an issue with a deprecated function in the newest version of Matplotlib (3.9.2 at date of post).
When using Matplotlib 3.7 or 3.8, it gives you a warning "The register_cmap function was deprecated in Matplotlib 3.7 and will be removed two minor releases later. Use matplotlib.colormaps.register(name) instead". Assuming this has not been integrated into hclust2 yet.
You could try downgrading your matplotlib-base package until it is fixed?

conda install --name hclust2 matplotlib-base==3.7.0

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

3 participants