Closed Pedramto89 closed 1 year ago
Hi @Pedramto89, your command is missing the option argument for the gene format you need to use --counts-data=hgnc_symbol
instead of just hgnc_symbol
.
Your full command should look something like this:
cellphonedb method statistical_analysis test_meta.txt test_counts.txt --iterations=10 --threads=2 --counts-data=hgnc_symbol
Thanks so much @prete for your prompt response! I could solve the problem by converting ensembl IDs and got the four files : pvalues, means, deconvoluted, significant_means.
Now I wanted to visualize the results but got an error:
cellphonedb plot dot_plot
This is the error:
"[ ][APP][15/01/23-11:42:50][ERROR] Unexpected error
Traceback (most recent call last):
File "/Users/pedram/opt/anaconda3/envs/cpdb/lib/python3.7/site-packages/cellphonedb/src/api_endpoints/terminal_api/plot_terminal_api_endpoints/plot_terminal_commands.py", line 38, in dot_plot
columns=columns)
File "/Users/pedram/opt/anaconda3/envs/cpdb/lib/python3.7/site-packages/cellphonedb/src/plotters/r_plotter.py", line 35, in wrapper
from rpy2.rinterface_lib.embedded import RRuntimeError
File "/Users/pedram/opt/anaconda3/envs/cpdb/lib/python3.7/site-packages/rpy2/rinterface_lib/embedded.py", line 7, in
That looks like an R-related error. Your issue seems to be realted to an R installation that doesn't match your conda env? I'd suggest trying to install that one using conda install r-base - r-ggplot2 - r-pheatmap -c conda-forge
.
If you don't want to install that you can still use your R version to run the plotting scripts manually. You'll find them here: https://github.com/ventolab/CellphoneDB/tree/master/cellphonedb/src/plotters/R
Alternatively, don't use CellphoneDB native plotting and try a thrid party package like ktplots or ktplotspy.
@prete I do not think it might be R related as I am using by anaconda env. Do you think it might be related to my laptop? (Mac M1)
Ah, yes Mac M1 have arm architecture instead of x86_64.
(mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64'))
There's a bigger issue where your conda may be intel installed and running with roseta as an emulator or using directly arm arch. However, keep in mind that the error you showed is looking for rlibs outside your conda env (/Library/Frameworks/R.framework/Resources/lib/libR.dylib
). That means you should install those into your conda env or run R/Rstudio directly from whatever you've got install on your laptop and try to execture the scripts.
It may be easier for you to try ktplotspy since it's python and won't require you to have that R-python connection which seems to be failing.
Hello @prete
I have both meta and counts files. However, when I run my code, it gives me n error.
The code I run:
cellphonedb method statistical_analysis test_meta.txt test_counts.txt --iterations=10 --threads=2 hgnc_symbol
The error I get: "Usage: cellphonedb method statistical_analysis [OPTIONS] META_FILENAME COUNTS_FILENAME Try 'cellphonedb method statistical_analysis --help' for help.
Error: Got unexpected extra argument (hgnc_symbol)"