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

[BUG] AttributeError: module 'numpy' has no attribute 'float'. #543

Open
juniajvs opened this issue May 3, 2024 · 1 comment
Open

[BUG] AttributeError: module 'numpy' has no attribute 'float'. #543

juniajvs opened this issue May 3, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@juniajvs
Copy link

juniajvs commented May 3, 2024

Hello all,

thanks for the great package.
I am having issues running the aucell part of your tutorial more specifically line 45:

!pyscenic aucell
{f_loom_path_scenic}
reg.csv
--output {f_pyscenic_output}
--num_workers 20

This is the output message including the error message that comes up:

2024-05-03 11:00:17,453 - pyscenic.cli.pyscenic - INFO - Loading expression matrix.

2024-05-03 11:00:19,938 - pyscenic.cli.pyscenic - INFO - Loading gene signatures.
Create regulons from a dataframe of enriched features.
Additional columns saved: []

2024-05-03 11:00:20,114 - pyscenic.cli.pyscenic - INFO - Calculating cellular enrichment.

2024-05-03 11:01:04,264 - pyscenic.cli.pyscenic - INFO - Writing results to file.
multiprocessing.pool.RemoteTraceback:
"""
Traceback (most recent call last):
File "/data1/software/miniconda/envs/pyscenic/lib/python3.10/multiprocessing/pool.py", line 125, in worker
result = (True, func(*args, **kwds))
File "/data1/software/miniconda/envs/pyscenic/lib/python3.10/multiprocessing/pool.py", line 51, in starmapstar
return list(itertools.starmap(args[0], args[1]))
File "/data1/software/miniconda/envs/pyscenic/lib/python3.10/site-packages/pyscenic/binarization.py", line 56, in derive_threshold
if not isbimodal(data, method):
File "/data1/software/miniconda/envs/pyscenic/lib/python3.10/site-packages/pyscenic/binarization.py", line 43, in isbimodal
_, pval, _ = diptst(np.msort(data))
File "/data1/software/miniconda/envs/pyscenic/lib/python3.10/site-packages/pyscenic/diptest.py", line 64, in diptst
else (np.less(d, unif_dips).sum() + 1) / (np.float(numt) + 1)
File "/data1/software/miniconda/envs/pyscenic/lib/python3.10/site-packages/numpy/init.py", line 324, 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
Output is truncated. View as a scrollable element or open in a text editor. Adjust cell output settings...

The source code needs to be modified to accommodate the changes in NumPy.

Best,
Junia

@juniajvs juniajvs added the bug Something isn't working label May 3, 2024
@ksarieva
Copy link

ksarieva commented May 6, 2024

I am not a developer. What helped me to overcome the same issue is to run pyscenic in docker like here https://pyscenic.readthedocs.io/en/stable/installation.html#:~:text=To%20run%20pySCENIC%20using%20Docker
However, it doesn't solve the problem downstream, for example, with regulon specificity scores...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants