khyox / recentrifuge

Recentrifuge: robust comparative analysis and contamination removal for metagenomics
http://www.recentrifuge.org
Other
86 stars 7 forks source link

float deprecated in numpy 1.24 #47

Closed Electrocyte closed 1 year ago

Electrocyte commented 1 year ago

Bug report

Bug summary

I believe that there is a clash between latest version of numpy deprecating float to use default float and openpyxl version.

Running Recentrifuge

Command line

~/recentrifuge/rcf -c 1 -f $NEGDIR -f $S1 -f $S2 -f $S3 -x 0 -x 9606 -n $NODES -o "$EOUT/samples-out.html" -e "$EOUT/samples-out.csv" -p

Data

Centrifuge troubleshooting files - 3 samples, 1 negative control

Actual outcome

Traceback (most recent call last):
  File "recentrifuge/rcf", line 63, in <module>
    import openpyxl
  File ".pyenv/versions/3.8.3/lib/python3.8/site-packages/openpyxl/__init__.py", line 4, in <module>
    from openpyxl.compat.numbers import NUMPY, PANDAS
  File ".pyenv/versions/3.8.3/lib/python3.8/site-packages/openpyxl/compat/__init__.py", line 3, in <module>
    from .numbers import NUMERIC_TYPES
  File ".pyenv/versions/3.8.3/lib/python3.8/site-packages/openpyxl/compat/numbers.py", line 41, in <module>
    numpy.float,
  File ".pyenv/versions/3.8.3/lib/python3.8/site-packages/numpy/__init__.py", line 305, in __getattr__
    raise AttributeError(__former_attrs__[attr])

AttributeError: module 'numpy' has no attribute 'float'.
`np.float` was a deprecated alias for the builtin `float`. To avoid this error in existing code, use `float` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.float64` here.
The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at:
    https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations

Expected outcome

Do I need to update openpyxl or use a container?

Versions

Electrocyte commented 1 year ago

I upgraded to openpyxl-3.1.1 and recentrifuge will now run