ventolab / CellphoneDB

CellPhoneDB can be used to search for a particular ligand/receptor, or interrogate your own HUMAN single-cell transcriptomics data.
https://www.cellphonedb.org/
MIT License
308 stars 51 forks source link

error related DEG analysis #77

Closed hypaik closed 1 year ago

hypaik commented 1 year ago

Hi, I try to use deg_analysis option of CellphoneDB in my cluster server. However, there is unexpected error that I can't solve. Can you fix this? Here is the error report from the shell.

[ ][CORE][14/11/22-13:52:58][INFO] Initializing SqlAlchemy CellPhoneDB Core [ ][CORE][14/11/22-13:52:58][INFO] Using custom database at /home/hyojung/.cpdb/releases/v4.0.0/cellphone.db [ ][APP][14/11/22-13:52:58][INFO] Launching Method cpdb_degs_analysis_local_method_launcher [ ][APP][14/11/22-13:52:58][INFO] Launching Method _set_paths [ ][APP][14/11/22-13:52:58][INFO] Launching Method _load_meta_counts [ ][APP][14/11/22-14:28:38][INFO] Launching Method _check_counts_data [ ][APP][14/11/22-14:28:38][INFO] Launching Method _load_degs [ ][CORE][14/11/22-14:28:38][INFO] Launching Method cpdb_degs_analysis_launcher [ ][CORE][14/11/22-14:28:38][INFO] Launching Method _counts_validations [ ][CORE][14/11/22-14:28:40][INFO] Launching Method get_interactions_genes_complex [ ][CORE][14/11/22-14:28:40][INFO] [Cluster DEGs Analysis] Threshold:0.1 Iterations:1000 Debug-seed:-1 Threads:8 Precision:3 [ ][CORE][14/11/22-14:28:40][WARNING]


DEGs ANALYSIS IS AN EXPERIMENTAL METHOD STILL UNDER DEVELOPMENT!


[ ][CORE][14/11/22-14:28:47][INFO] Running Real Analysis [ ][CORE][14/11/22-14:28:47][INFO] Running DEGs-based Analysis [ ][APP][14/11/22-14:28:47][ERROR] Unexpected error Traceback (most recent call last): File "/home/hyojung/.conda/envs/cpdb/lib/python3.7/site-packages/cellphonedb/src/api_endpoints/terminal_api/method_terminal_api_endpoints/method_terminal_commands.py", line 300, in degs_analysis debug File "/home/hyojung/.conda/envs/cpdb/lib/python3.7/site-packages/cellphonedb/src/local_launchers/local_method_launcher.py", line 176, in cpdb_degs_analysis_local_method_launcher output_path File "/home/hyojung/.conda/envs/cpdb/lib/python3.7/site-packages/cellphonedb/src/core/methods/method_launcher.py", line 212, in cpdb_degs_analysis_launcher output_path) File "/home/hyojung/.conda/envs/cpdb/lib/python3.7/site-packages/cellphonedb/src/core/methods/cpdb_degs_analysis_method.py", line 153, in call counts_data) File "/home/hyojung/.conda/envs/cpdb/lib/python3.7/site-packages/cellphonedb/src/core/methods/cpdb_degs_analysis_method.py", line 362, in build_degs_matrix d = d.groupby(d.index).max() File "/home/hyojung/.conda/envs/cpdb/lib/python3.7/site-packages/pandas/core/groupby/groupby.py", line 1560, in max numeric_only=numeric_only, min_count=min_count, alias="max", npfunc=np.max File "/home/hyojung/.conda/envs/cpdb/lib/python3.7/site-packages/pandas/core/groupby/groupby.py", line 1001, in _agg_general how=alias, alt=npfunc, numeric_only=numeric_only, min_count=min_count, File "/home/hyojung/.conda/envs/cpdb/lib/python3.7/site-packages/pandas/core/groupby/generic.py", line 1022, in _cython_agg_general how, alt=alt, numeric_only=numeric_only, min_count=min_count File "/home/hyojung/.conda/envs/cpdb/lib/python3.7/site-packages/pandas/core/groupby/generic.py", line 1135, in _cython_agg_blocks assert len(locs) == result.shape[1] AssertionError

hypaik commented 1 year ago

In addition, this is the header of deg meta file I used.

cluster names pvals_adj pvals logfoldchanges cl1dM1_3 HLA-DRA 0.0 0.0 7.1917353 cl1dM1_3 CD74 0.0 0.0 6.279676 cl1dM1_3 IFI30 0.0 0.0 6.1529694 cl1dM1_3 HLA-DPA1 0.0 0.0 6.9989967 cl1dM1_3 HLA-DRB1 0.0 0.0 6.993933 cl1dM1_3 PSAP 0.0 0.0 4.2262936 cl1dM1_3 HLA-DPB1 0.0 0.0 6.865262 cl1dM1_3 VIM 0.0 0.0 4.5743175 cl1dM1_3 TYROBP 0.0 0.0 4.3414674 cl1dM1_3 CTSS 0.0 0.0 4.1058383 cl1dM1_3 LAPTM5 0.0 0.0 4.002234 cl1dM1_3 CST3 0.0 0.0 4.1011577 cl1dM1_3 HLA-DQB1 0.0 0.0 6.8407984 cl1dM1_3 CD68 0.0 0.0 4.541865 cl1dM1_3 FCGR3A 0.0 0.0 5.4345884 cl1dM1_3 GRN 0.0 0.0 3.991999 cl1dM1_3 LYZ 0.0 0.0 5.7743874 cl1dM1_3 CTSB 0.0 0.0 4.09902 cl1dM1_3 TYMP 0.0 0.0 4.304454

prete commented 1 year ago

Hi @hypaik, thank you for using CellPhone DB. We've seen a similar issue recently, can I check if you're using --counts-data=gene_name? If so, please try running it again but using --counts-data=hgnc_symbol instead to see if that works.

hypaik commented 1 year ago

Hi @hypaik, thank you for using CellPhone DB. We've seen a similar issue recently, can I check if you're using --counts-data=gene_name? If so, please try running it again but using --counts-data=hgnc_symbol instead to see if that works.

Hi, @prete ... thank you for your prompt reseponse. I tried '--counts-data=hgnc_symbol` . Finally, it works for me. Thanks! However, you will need to update the manual for this issue (for fix it...)