CostaLab / CrossTalkeR

R package to do the Ligand Receptor Analysis Visualization
https://costalab.github.io/CrossTalkeR/
MIT License
41 stars 10 forks source link

Group comparison #30

Open JDavies95 opened 3 years ago

JDavies95 commented 3 years ago

Hi, I am trying to do the analyse comparing disease to control but i keep receiving this error:

R[write to console]: Error in prcomp.default(all_both, center = TRUE, scale = TRUE) : cannot rescale a constant/zero column to unit variance

Error in prcomp.default(all_both, center = TRUE, scale = TRUE) : cannot rescale a constant/zero column to unit variance

Any advice on what I may be doing wrong?

Thanks!

jsnagai commented 3 years ago

@JDavies95 Are you using CellPhoneDB input to CrossTalkeR? How many cell types do you have? I need more details about what you have.

zhanglab2008 commented 3 years ago

I came across exactly the same error in one of my comparison. I also want to know what happens. It seems it's due to the prcomp. Maybe all rows have the same variance? https://stackoverflow.com/questions/40315227/how-to-solve-prcomp-default-cannot-rescale-a-constant-zero-column-to-unit-var