ValueError: a must be scalar or 1 dimensional, use .ravel to flatten
See original GitHub issueI have encountered ERROE: “ValueError: a must be scalar or 1 dimensional, use .ravel to flatten”
cellphonedb 3.0
Here the error
‘’’
[ ][APP][14/02/22-18:50:05][WARNING] Latest local available version is v2.0.0
, using it
[ ][APP][14/02/22-18:50:05][WARNING] User selected downloaded database v2.0.0
is available, using it
[ ][CORE][14/02/22-18:50:05][INFO] Initializing SqlAlchemy CellPhoneDB Core
[ ][CORE][14/02/22-18:50:05][INFO] Using custom database at /public1/home/scfa1516/.cpdb/releases/v2.0.0/cellphone.db
[ ][APP][14/02/22-18:50:05][INFO] Launching Method cpdb_statistical_analysis_local_method_launcher
[ ][APP][14/02/22-18:50:05][INFO] Launching Method _set_paths
[ ][APP][14/02/22-18:50:05][INFO] Launching Method _load_meta_counts
[ ][APP][14/02/22-18:58:03][INFO] Launching Method _check_counts_data
[ ][CORE][14/02/22-18:58:03][INFO] Launching Method cpdb_statistical_analysis_launcher
[ ][CORE][14/02/22-18:58:03][INFO] Launching Method _counts_validations
[ ][CORE][14/02/22-18:58:04][INFO] Launching Method get_interactions_genes_complex
[ ][CORE][14/02/22-18:58:05][INFO] [Cluster Statistical Analysis] Threshold:0.1 Iterations:1000 Debug-seed:-1 Threads:40 Precision:3
[ ][APP][14/02/22-18:58:07][ERROR] Unexpected error
Traceback (most recent call last):
File “/public1/home/scfa1516/miniconda3/envs/cpdb/lib/python3.8/site-packages/cellphonedb/src/api_endpoints/terminal_api/method_terminal_api_endpoints/method_terminal_commands.py”, line 131, in statistical_analysis
LocalMethodLauncher(cpdb_app.create_app(verbose, database)).
File “/public1/home/scfa1516/miniconda3/envs/cpdb/lib/python3.8/site-packages/cellphonedb/src/local_launchers/local_method_launcher.py”, line 62, in cpdb_statistical_analysis_local_method_launcher
self.cellphonedb_app.method.cpdb_statistical_analysis_launcher(
File “/public1/home/scfa1516/miniconda3/envs/cpdb/lib/python3.8/site-packages/cellphonedb/src/core/methods/method_launcher.py”, line 95, in cpdb_statistical_analysis_launcher
cpdb_statistical_analysis_method.call(meta,
File “/public1/home/scfa1516/miniconda3/envs/cpdb/lib/python3.8/site-packages/cellphonedb/src/core/methods/cpdb_statistical_analysis_method.py”, line 27, in call
cpdb_statistical_analysis_complex_method.call(meta.copy(),
File “/public1/home/scfa1516/miniconda3/envs/cpdb/lib/python3.8/site-packages/cellphonedb/src/core/methods/cpdb_statistical_analysis_complex_method.py”, line 61, in call
clusters = cpdb_statistical_analysis_helper.build_clusters(meta, counts_filtered, complex_composition_filtered, skip_percent=False)
File “/public1/home/scfa1516/miniconda3/envs/cpdb/lib/python3.8/site-packages/cellphonedb/src/core/methods/cpdb_statistical_analysis_helper.py”, line 141, in build_clusters
npg.aggregate(meta[CELL_TYPE].cat.codes, counts.values, func=‘mean’, axis=1),
File “/public1/home/scfa1516/miniconda3/envs/cpdb/lib/python3.8/site-packages/numpy_groupies/aggregate_numpy.py”, line 249, in aggregate
return _aggregate_base(group_idx, a, size=size, fill_value=fill_value,
File “/public1/home/scfa1516/miniconda3/envs/cpdb/lib/python3.8/site-packages/numpy_groupies/aggregate_numpy.py”, line 219, in _aggregate_base
group_idx, a, flat_size, ndim_idx, size = input_validation(group_idx, a,
File “/public1/home/scfa1516/miniconda3/envs/cpdb/lib/python3.8/site-packages/numpy_groupies/utils.py”, line 341, in input_validation
raise ValueError(“a must be scalar or 1 dimensional, use .ravel to”
ValueError: a must be scalar or 1 dimensional, use .ravel to flatten
‘’’
Here the input files
package list Package Version
aniso8601 9.0.1 anndata 0.7.8 annoy 1.17.0 attrs 21.4.0 backports.zoneinfo 0.2.1 bbknn 1.5.1 boto3 1.20.47 botocore 1.23.47 CellPhoneDB 3.0.0 certifi 2021.10.8 cffi 1.15.0 charset-normalizer 2.0.11 click 7.1.1 conda-pack 0.6.0 cycler 0.11.0 Cython 0.29.27 fbpca 1.0 Flask 1.1.4 Flask-RESTful 0.3.9 Flask-Testing 0.8.1 fonttools 4.28.2 geosketch 0.3 h5py 2.10.0 idna 3.3 igraph 0.9.9 iniconfig 1.1.1 itsdangerous 1.1.0 Jinja2 2.11.2 jmespath 0.10.0 joblib 1.1.0 kiwisolver 1.3.2 leidenalg 0.8.8 llvmlite 0.37.0 MarkupSafe 2.0.1 matplotlib 3.5.0 natsort 8.0.0 networkx 2.6.3 nose 1.3.7 numba 0.54.1 numexpr 2.7.3 numpy 1.18.0 numpy-groupies 0.9.1 packaging 21.3 pandas 1.1.4 patsy 0.5.2 pika 1.2.0 Pillow 8.4.0 pip 21.2.4 pluggy 1.0.0 py 1.11.0 pycparser 2.21 pynndescent 0.5.5 pyparsing 3.0.6 pytest 6.2.5 pytest-runner 5.3.1 python-dateutil 2.8.2 python-igraph 0.9.9 pytz 2021.3 pytz-deprecation-shim 0.1.0.post0 PyYAML 5.4.1 request2 0.2 requests 2.27.1 rpy2 3.4.1 s3transfer 0.5.1 scanpy 1.8.2 scikit-learn 0.22 scipy 1.7.2 seaborn 0.11.2 setuptools 58.0.4 setuptools-scm 6.3.2 sinfo 0.3.4 six 1.16.0 SQLAlchemy 1.3.9 statsmodels 0.13.1 stdlib-list 0.8.0 tables 3.6.1 texttable 1.6.4 threadpoolctl 3.0.0 toml 0.10.2 tomli 1.2.2 tqdm 4.62.3 tzdata 2021.5 tzlocal 4.1 umap-learn 0.5.2 urllib3 1.26.8 Werkzeug 1.0.1 wheel 0.37.0 xlrd 1.2.0
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (1 by maintainers)
Top GitHub Comments
I reinstalled cellphoneDB v3.0 using conda environment and it solved my problem. Thanks !
indeed, problem in my installation, it’s solved,Thanks