Teichlab / cellphonedb

MIT License
338 stars 105 forks source link

The cellphonedb running weird error #295

Closed honghh2018 closed 3 years ago

honghh2018 commented 3 years ago

Hi @All, Thanks to develop the great tools. I got some weird issue when running the cellphonedb to analyze my data, The inputed metadata.tsv like below: the metadata had three type:EPCAM-neg,EPCAM-pos and Fibroblasts image The inputed matrix.tsv like below: the number of metadata.tsv 's barcode are identical with matrix.tsv file columns image The running shell like below: cellphonedb method statistical_analysis --project-name tissue --iterations 1000 --threshold 0.2 --result-precision 3 --output-path outs2/cellphone --verbose --threads 14 metadata.tsv matrix.tsv The error post below:

image image image The error information was complexed and how can i fix this issue ? any advice would be appreciated. hanhuihong

prete commented 3 years ago

Hi @honghh2018 the errors are a bit confusing, specially because the command you say you ran is:

cellphonedb method statistical_analysis --project-name tissue --iterations 1000 --threshold 0.2 --result-precision 3 --output-path outs2/cellphone --verbose --threads 14 metadata.tsv matrix.tsv

and the last error shows a different command being invoked:

Usage: cellphonedb plot dot_plot

Are all this errors from the same command? Could you tell me how did you create the environment to run this? was it venv or conda? What's your version of cellphonedb and pandas? (pip show cellphonedb pandas)

honghh2018 commented 3 years ago

Hi @prete , It was sorry to reply this late. The cellphonedb and pandas version showing below: image

the cellphonedb plot dot_plot was the next step on my  wrapper pipeline of cellphonedb.
In my case,  this error was shown up on step one, the pvalue.txt and means.txt can not be generated. because of the step one had no successful, it triggerred the  cellphonedb plot error subsequently. just like i post above. the step one cannot get through.

image

why the step one can not be run ?
 Any advice would be appreciated.
 hanhuihong
honghh2018 commented 3 years ago

Can anybody hear this ?

honghh2018 commented 3 years ago

I run it again, it show me below error image But i assure that the rowname had no duplication any advice would be appreciated

prete commented 3 years ago

Update CellphoneDB and downgrade your pandas version to fix this issue.

First upgrade Cellphone DB to the latest version: pip install -U cellphonedb

Then make sure your pandas version is pandas>=1.0.0,<=1.1.4 (that means higher than 1.0.0 and lower or equal to 1.1.4). If it's not you need to downgrade it to the correct version using: pip install -U pandas==1.1.4

That will solve your problem.

honghh2018 commented 3 years ago

Excellent! It work. Cellphonedb updated later, the data could run well. Thanks