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

R plot error dot_plot #49

Closed honghh2018 closed 7 months ago

honghh2018 commented 2 years ago

Hi developer, The cellphonedb build in conda virtual environment, but when plot dot_plot, it trigger below error,

Error in glue(.Internal(R.home()), "library", "base", "R", "base", sep = .Platform$file.sep) : 4 arguments passed to .Internal(paste) which requires 3 Error: could not find function "attach" Error: object '.ArgsEnv' not found Fatal error: unable to initialize the JIT

sessionInfo() R version 4.1.2 (2021-11-01) Platform: x86_64-conda-linux-gnu (64-bit) Running under: CentOS Linux 7 (Core)

Matrix products: default BLAS/LAPACK: /share/apps/miniconda3/envs/cellphonedb_20220616/lib/libopenblasp-r0.3.20.so

locale: [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
[3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8
[5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=en_US.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C

attached base packages: [1] stats graphics grDevices utils datasets methods base

loaded via a namespace (and not attached): [1] compiler_4.1.2

python: Python 3.8.12 | packaged by conda-forge | (default, Oct 12 2021, 21:57:06) [GCC 9.4.0] on linux Type "help", "copyright", "credits" or "license" for more information.

the cellphone command line: cellphonedb plot dot_plot --means-path cellphone/tissue/ligand/AMBP+-Mac/means.txt --pvalues-path cellphone/tissue/ligand/AMBP+-Mac/pvalues.txt --output-path ./ --output-name cellphone.pdf

These issues were so weird, I build the cellphonedb in another Centos 7 machine's conda environment, but it still get the same error. Base on this, i surely confirm that it's the cellphonedb issue not the CENOTS7 environment. whether or not the cellphonedb updated occurred the unstable ?

how can i fix this issue? Best hanhuihong

honghh2018 commented 2 years ago

had anyone hear this ?

prete commented 2 years ago

Hi @honghh2018, I'm unfamiliar with that error but possibly rpy2 is picking up an R version that's not the same you have in your environment. Could you make sureR_HOME points to your R installation? if it's not set, try setting it to your R interpreter before launching cellphendb:

export R_HOME=/path/to/iniconda3/envs/cellphonedb/lib/R (or something similar)
cellphonedb plot dot_plot ...
honghh2018 commented 1 year ago

Hi @prete , thanks the soon reply, I check the R_HOME with echo $R_HOME is empty image and then i setting the R_HOME with below command: export R_HOME="/apps/miniconda3/envs/cellphonedb_20220616-1/lib/R" and then run the cellphonedb again in miniconda environment, unfortunately, it still get same error (cellphonedb_20220616-1) 16:30 hhhong@master01:~/01.cellphonedb/outs

$sh test.sh Error in glue(.Internal(R.home()), "library", "base", "R", "base", sep = .Platform$file.sep) : 4 arguments passed to .Internal(paste) which requires 3 Error: could not find function "attach" Error: object '.ArgsEnv' not found Fatal error: unable to initialize the JIT

The command lying below: cellphonedb plot dot_plot --means-path /AMBP+-Mac/means.txt --pvalues-path AMBP+-Mac/pvalues.txt --output-path ./ --output-name plot11.pdf

prete commented 1 year ago

I think you need /share/apps/miniconda3/envs[...] instead of just /apps/miniconda3/envs/[...] (missing the /share/ at the begining). However, If that's not it, then it may be related to your rpy2 version. Could you confirm which one you've got (pip show rpy2)?

honghh2018 commented 1 year ago

Hi @prete , The path was same as /share/apps/miniconda3/envs[...], in above post, i just cut the path string against for the server path detail. $pip show rpy2 Name: rpy2 Version: 3.5.2 Summary: Python interface to the R language (embedded R) Home-page: https://rpy2.github.io Author: Laurent Gautier Author-email: lgautier@gmail.com License: GPLv2+ Location: /share/apps/miniconda3/envs/cellphonedb_20220616-1/lib/python3.8/site-packages Requires: cffi, tzlocal, jinja2, pytz Required-by: CellPhoneDB

I set the R_HOME in command line , however, it still getting error. for another hand i change another machine with CENTOS 7 system, it still get same error.

Best

honghh2018 commented 1 year ago

Had anyone hear this ?

lnan1994 commented 1 year ago

If Python and R were installed with Conda, then install rpy2 also with Conda: conda install --yes rpy2

catsargent commented 1 year ago

I am having the same issue. Setting $R_HOME did not help me either. I have rpy2 3.5.6 installed.

Error in `::`(base, quote) : could not find function "::"
Error in .makeMessage(..., domain = domain) :
  3 arguments passed to .Internal(gettext) which requires 2
Error in gettext(fmt, domain = domain, trim = trim) :
  3 arguments passed to .Internal(gettext) which requires 2
Error in `:::`(compiler, checkCompilerOptions) :
  could not find function ":::"
Fatal error: unable to initialize the JIT
lnan1994 commented 1 year ago

I am having the same issue. Setting $R_HOME did not help me either. I have rpy2 3.5.6 installed.

Error in `::`(base, quote) : could not find function "::"
Error in .makeMessage(..., domain = domain) :
  3 arguments passed to .Internal(gettext) which requires 2
Error in gettext(fmt, domain = domain, trim = trim) :
  3 arguments passed to .Internal(gettext) which requires 2
Error in `:::`(compiler, checkCompilerOptions) :
  could not find function ":::"
Fatal error: unable to initialize the JIT

Maybe you can find the answer here:https://stackoverflow.com/questions/58611486/r-kernel-crashes-while-loading-r-package-using-rpy2