aertslab / pySCENIC

pySCENIC is a lightning-fast python implementation of the SCENIC pipeline (Single-Cell rEgulatory Network Inference and Clustering) which enables biologists to infer transcription factors, gene regulatory networks and cell types from single-cell RNA-seq data.
http://scenic.aertslab.org
GNU General Public License v3.0
424 stars 179 forks source link

[ERROR] in running Pyscenic GRN grnboost2 #557

Open husain223 opened 3 months ago

husain223 commented 3 months ago

Describe the bug I am trying to run Pyscenic GRN but its giving me error and i am unable to solve the issue.

Steps to reproduce the behavior

  1. Command run when the error occurred:
    
    pyscenic grn dm6_filtered_scenic.loom allTFs_dmel.txt -o adjw.csv --method grnboost2

2. Error encountered:
<!-- Please specify the **complete** error message (if applicable, otherwise delete this block): -->
```pytb
2024-06-24 11:50:18,063 - pyscenic.cli.pyscenic - INFO - Loading expression matrix.
Traceback (most recent call last):
  File "/opt/miniconda3/envs/pyscenic/bin/pyscenic", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/opt/miniconda3/envs/pyscenic/lib/python3.12/site-packages/pyscenic/cli/pyscenic.py", line 713, in main
    args.func(args)
  File "/opt/miniconda3/envs/pyscenic/lib/python3.12/site-packages/pyscenic/cli/pyscenic.py", line 59, in find_adjacencies_command
    ex_mtx = load_exp_matrix(
             ^^^^^^^^^^^^^^^^
  File "/opt/miniconda3/envs/pyscenic/lib/python3.12/site-packages/pyscenic/cli/utils.py", line 134, in load_exp_matrix
    return load_exp_matrix_as_loom(
           ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/miniconda3/envs/pyscenic/lib/python3.12/site-packages/pyscenic/cli/utils.py", line 82, in load_exp_matrix_as_loom
    with lp.connect(fname, mode="r", validate=False) as ds:
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/miniconda3/envs/pyscenic/lib/python3.12/site-packages/loompy/loompy.py", line 1515, in connect
    return LoomConnection(filename, mode, validate=validate)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/miniconda3/envs/pyscenic/lib/python3.12/site-packages/loompy/loompy.py", line 98, in __init__
    self.attrs = loompy.GlobalAttributeManager(self._file)  #: Global attributes
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/miniconda3/envs/pyscenic/lib/python3.12/site-packages/loompy/global_attribute_manager.py", line 23, in __init__
    materialized = loompy.materialize_attr_values(val[()])
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/miniconda3/envs/pyscenic/lib/python3.12/site-packages/loompy/normalize.py", line 91, in materialize_attr_values
    if np.issubdtype(a.dtype, np.string_) or np.issubdtype(a.dtype, np.object_):
                              ^^^^^^^^^^
  File "/opt/miniconda3/envs/pyscenic/lib/python3.12/site-packages/numpy/__init__.py", line 397, in __getattr__
    raise AttributeError(
AttributeError: `np.string_` was removed in the NumPy 2.0 release. Use `np.bytes_` instead.. Did you mean: 'strings'?

Please complete the following information:

ghuls commented 3 months ago

Install an older version of numpy.

ghuls commented 2 months ago

Or use the Docker/Podman/Singularity/Apptainer images: https://pyscenic.readthedocs.io/en/latest/installation.html#docker-podman-and-singularity-apptainer-images