Hallgram related depracation warnings while running HAllA v0.8.20 and solutions

I installed HAllA version 0.8.20 in a conda environment [python v3.7.12] and tried running it using the following command:
halla -x x_updated.txt -y y.txt -o halla0.8.20_res_alpha0.25 --fdr_alpha 0.25 -m spearman

I got the following Deprecation Warning message when HAllA reached the stage of hallagram:

Traceback (most recent call last):
  File "~/miniconda3/envs/halla0.8.20/bin/halla", line 33, in <module>
    sys.exit(load_entry_point('HAllA==0.8.20', 'console_scripts', 'halla')())
  File "~/miniconda3/envs/halla0.8.20/lib/python3.7/site-packages/scripts/halla.py", line 270, in main
    cbar_label=params.cbar_label, trim = params.trim)
  File "~/miniconda3/envs/halla0.8.20/lib/python3.7/site-packages/halla/main.py", line 429, in generate_hallagram
    mask=mask, signif_dots=signif_dots, block_num=block_num, **kwargs)
  File "~/miniconda3/envs/halla0.8.20/lib/python3.7/site-packages/halla/utils/report.py", line 171, in generate_hallagram
    zorder=3, cbar_ax=cbar_ax, ax=ax, cbar_kws=cbar_kws, **kwargs)
  File "~/miniconda3/envs/halla0.8.20/lib/python3.7/site-packages/seaborn/matrix.py", line 537, in heatmap
    yticklabels, mask)
  File "~/miniconda3/envs/halla0.8.20/lib/python3.7/site-packages/seaborn/matrix.py", line 111, in __init__
    mask = _matrix_mask(data, mask)
  File "~/miniconda3/envs/halla0.8.20/lib/python3.7/site-packages/seaborn/matrix.py", line 68, in _matrix_mask
    mask = np.zeros(data.shape, np.bool)
  File "~/miniconda3/envs/halla0.8.20/lib/python3.7/site-packages/numpy/__init__.py", line 297, in __getattr__
    warnings.warn(msg, DeprecationWarning, stacklevel=2)
DeprecationWarning: `np.bool` is a deprecated alias for the builtin `bool`. To silence this warning, use `bool` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.bool_` here.

So I decided to change all the lines which contained np.bool into bool in the code matrix.py which was found in ~/miniconda3/envs/halla0.8.20/lib/python3.7/site-packages/seaborn/matrix.py .

I ran the command mentioned above again and got another Depracation Warning (hallagram related as well):

  File "~/miniconda3/envs/halla0.8.20/bin/halla", line 33, in <module>
    sys.exit(load_entry_point('HAllA==0.8.20', 'console_scripts', 'halla')())
  File "~/miniconda3/envs/halla0.8.20/lib/python3.7/site-packages/scripts/halla.py", line 270, in main
    cbar_label=params.cbar_label, trim = params.trim)
  File "~/miniconda3/envs/halla0.8.20/lib/python3.7/site-packages/halla/main.py", line 429, in generate_hallagram
    mask=mask, signif_dots=signif_dots, block_num=block_num, **kwargs)
  File "~/miniconda3/envs/halla0.8.20/lib/python3.7/site-packages/halla/utils/report.py", line 230, in generate_hallagram
    plt.savefig(output_file, format=output_file.split('.')[-1].lower(), bbox_inches='tight', dpi=dpi)
  File "~/miniconda3/envs/halla0.8.20/lib/python3.7/site-packages/matplotlib/pyplot.py", line 977, in savefig
    res = fig.savefig(*args, **kwargs)
  File "~/miniconda3/envs/halla0.8.20/lib/python3.7/site-packages/matplotlib/figure.py", line 3058, in savefig
    self.canvas.print_figure(fname, **kwargs)
  File "~/miniconda3/envs/halla0.8.20/lib/python3.7/site-packages/matplotlib/backends/backend_qtagg.py", line 85, in print_figure
    super().print_figure(*args, **kwargs)
  File "~/miniconda3/envs/halla0.8.20/lib/python3.7/site-packages/matplotlib/backend_bases.py", line 2259, in print_figure
    canvas = self._get_output_canvas(backend, format)
  File "~/miniconda3/envs/halla0.8.20/lib/python3.7/site-packages/matplotlib/backend_bases.py", line 2184, in _get_output_canvas
    canvas_class = get_registered_canvas_class(fmt)
  File "~/miniconda3/envs/halla0.8.20/lib/python3.7/site-packages/matplotlib/backend_bases.py", line 144, in get_registered_canvas_class
    backend_class = importlib.import_module(backend_class).FigureCanvas
  File "~/miniconda3/envs/halla0.8.20/lib/python3.7/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 728, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "~/miniconda3/envs/halla0.8.20/lib/python3.7/site-packages/matplotlib/backends/backend_pdf.py", line 47, in <module>
    from . import _backend_pdf_ps
  File "~/miniconda3/envs/halla0.8.20/lib/python3.7/site-packages/matplotlib/backends/_backend_pdf_ps.py", line 8, in <module>
    from fontTools import subset
  File "~/miniconda3/envs/halla0.8.20/lib/python3.7/site-packages/fontTools/subset/__init__.py", line 6, in <module>
    from fontTools import ttLib
  File "~/miniconda3/envs/halla0.8.20/lib/python3.7/site-packages/fontTools/ttLib/__init__.py", line 57, in <module>
    from fontTools.ttLib.ttFont import *
  File "~/miniconda3/envs/halla0.8.20/lib/python3.7/site-packages/fontTools/ttLib/ttFont.py", line 1, in <module>
    from fontTools.misc import xmlWriter
  File "~/miniconda3/envs/halla0.8.20/lib/python3.7/site-packages/fontTools/misc/xmlWriter.py", line 3, in <module>
    from fontTools.misc.py23 import byteord, strjoin, tobytes, tostr
  File "~/miniconda3/envs/halla0.8.20/lib/python3.7/site-packages/fontTools/misc/py23.py", line 14, in <module>
    DeprecationWarning,
DeprecationWarning: The py23 module has been deprecated and will be removed in a future release. Please update your code.

I solved this by updating the package fonttools:
conda update fonttools

This solved all the issues.

I hope this helps anyone who stumbles upon a similar problem

Thanks for pointing this out. For reference I think this was caused by a mixture of a new numpy installation on your system combined with older matplotlib/seaborn installs. Not anything caused by HAllA itself. As far as I can tell new versions of matplotlib/seaborn have fixed the code generating the warnings you saw.