Hallagram error cmap?

I am running into an error trying to run hallagram. I am on a Mac osx 10.11.6 & have just installed halla and its dependencies using pip so should be the most up-to-date version of program as of today.

hallagram similarity_table.txt hypotheses_tree.txt associations.txt --outfile hallagram.pdf
usage: hallagram [-h] [–strongest STRONGEST] [–largest LARGEST] [–mask]
[–cmap CMAP] [–axlabels AXLABELS AXLABELS]
[–outfile OUTFILE] [–similarity SIMILARITY]
[–orderby ORDERBY]
simtable tree associations
hallagram: error: unrecognized arguments: hallagram.pdf
(base) cassie-ettingers-macbook-pro:halla_its_16s_output Cassie$ hallagram $hallagram similarity_table.txt hypotheses_tree.txt associations.txt --outfile hallagram.pdf
Traceback (most recent call last):
File “/opt/miniconda3/bin/hallagram”, line 8, in
File “/opt/miniconda3/lib/python3.7/site-packages/halla/hallagram.py”, line 354, in main
File “/opt/miniconda3/lib/python3.7/site-packages/halla/hallagram.py”, line 269, in plot
File “/opt/miniconda3/lib/python3.7/site-packages/matplotlib/colorbar.py”, line 450, in init
cbook._check_isinstance([colors.Colormap, None], cmap=cmap)
File “/opt/miniconda3/lib/python3.7/site-packages/matplotlib/cbook/init.py”, line 2128, in _check_isinstance
TypeError: ‘cmap’ must be an instance of matplotlib.colors.Colormap or None, not a str

Dear all.

I am also encountering the exact same error. I tried to explicitly specify --cmap in the command to one of the colourmap names, but to no avail.

Thank you very much.



Hello, Thank you for the detailed post. Can you try rolling back your version of matplotlib? I think you likely have at least v3.1.0 installed and it looks like from that version forward the inheritance of the matplotlib.colors.Colormap class changed. I think this change is resulting in the error you see when hallgram tries to set the cmap type with a string. Sorry for the confusing error message. We will work on our end to update HAllA to work with the latest version of matplotlib. To resolve the error message for your install if you would try rolling back to a matplotlib version prior to v3.1.0 I think it should resolve the error you are seeing.