saezlab / liana

LIANA: a LIgand-receptor ANalysis frAmework
https://saezlab.github.io/liana/
GNU General Public License v3.0
169 stars 30 forks source link

Error with Call Cell Chat #75

Closed jonhsussman closed 10 months ago

jonhsussman commented 1 year ago

Hello,

I am getting the following error when running "call_cellchat." It runs through as follows, but then displays the error of unused argument (do.fast = TRUE). Have you encountered this error?

liana.cellchat.2 <- liana_wrap(seurat.timepoint2, method = "call_cellchat", idents_col = 'annotations.update')  
Expression from the `RNA` assay will be used
Running LIANA with `annotations.update` as labels!
`Idents` were converted to factor
Now Running: Call_cellchat
[1] "Create a CellChat object from a data matrix"
Set cell identities for the new CellChat object 
The cell groups used for CellChat analysis are  AC-like 1[...]T Cell 
New names:
• `"is_directed"` -> `.is_directed.`
• `"is_stimulation"` -> `.is_stimulation.`
• `"is_inhibition"` -> `.is_inhibition.`
• `"co_A_receptor"` -> `.co_A_receptor.`
• `"co_I_receptor"` -> `.co_I_receptor.`
Issue identified!! Please check the official Gene Symbol of the following genes:  
 CMKLR2 
  |++++++++++++++++++++++++++++++++++++++++++++++++++| 100% elapsed=01m 11s
  |++++++++++++++++++++++++++++++++++++++++++++++++++| 100% elapsed=01m 27s
  |++++++++++++++++++++++++++++++++++++++++++++++++++| 100% elapsed=60s  
  |++++++++++++++++++++++++++++++++++++++++++++++++++| 100% elapsed=01m 08s
  |++++++++++++++++++++++++++++++++++++++++++++++++++| 100% elapsed=01m 32s
  |++++++++++++++++++++++++++++++++++++++++++++++++++| 100% elapsed=01m 19s
  |++++++++++++++++++++++++++++++++++++++++++++++++++| 100% elapsed=01m 06s
  |++++++++++++++++++++++++++++++++++++++++++++++++++| 100% elapsed=01m 06s
  |++++++++++++++++++++++++++++++++++++++++++++++++++| 100% elapsed=54s  
  |++++++++++++++++++++++++++++++++++++++++++++++++++| 100% elapsed=46s  
  |++++++++++++++++++++++++++++++++++++++++++++++++++| 100% elapsed=01m 33s
  |++++++++++++++++++++++++++++++++++++++++++++++++++| 100% elapsed=01m 09s
  |++++++++++++++++++++++++++++++++++++++++++++++++++| 100% elapsed=50s  
  |++++++++++++++++++++++++++++++++++++++++++++++++++| 100% elapsed=01m 02s
  |++++++++++++++++++++++++++++++++++++++++++++++++++| 100% elapsed=01m 10s
  |++++++++++++++++++++++++++++++++++++++++++++++++++| 100% elapsed=01m 14s
  |++++++++++++++++++++++++++++++++++++++++++++++++++| 100% elapsed=00s  
  |++++++++++++++++++++++++++++++++++++++++++++++++++| 100% elapsed=01s  
Error: unused argument (do.fast = TRUE)
Warning messages:
1: In exec(output, ...) :
  287 genes and/or 0 cells were removed as they had no counts!
2: In asMethod(object) :
  sparse->dense coercion: allocating vector of size 1.2 GiB
dbdimitrov commented 1 year ago

Hi,

This coercion: allocating vector of size 1.2 GiB seems to be related to RAM issues and/or the CellChat method itself. If I remember correctly, this is an issue specific to Linux machines. Perhaps, if RAM limitations are not the issue, you could check the issues posted on CellChat for a potential solution :)

Hope this helps. Daniel

jonhsussman commented 1 year ago

Thanks for your reply; the RAM is not an issue on the server so it would likely be an issue related to CellChat. I'll inquire to CellChat about a potential solution to this

--Jonathan

dashaveraksa commented 10 months ago

Hi, I am having the exact same issue. I looked into the CellChat source code for computeCommunProb() here and it seems like do.fast is not in the function definition. Do you think that is the cause of the issue, or is it something to do with the CMKLR2 gene? My code:

liana_gpx_cellchat <- liana_wrap(gpx_seurat,min_cells=2,method="call_cellchat")

Error message:

Expression from the `GeoMx` assay will be used
Running LIANA with `colLabels`/`Idents` as labels (matching column in metadata not found).
Now Running: Call_cellchat
[1] "Create a CellChat object from a data matrix"
Set cell identities for the new CellChat object 
The cell groups used for CellChat analysis are  FALSE TRUE 
New names:
* `"is_directed"` -> `.is_directed.`
* `"is_stimulation"` -> `.is_stimulation.`
* `"is_inhibition"` -> `.is_inhibition.`
* `"co_A_receptor"` -> `.co_A_receptor.`
* `"co_I_receptor"` -> `.co_I_receptor.`
Issue identified!! Please check the official Gene Symbol of the following genes:  
 CMKLR2 
  |++++++++++++++++++++++++++++++++++++++++++++++++++| 100% elapsed=01s  
  |++++++++++++++++++++++++++++++++++++++++++++++++++| 100% elapsed=01s  
  |++++++++++++++++++++++++++++++++++++++++++++++++++| 100% elapsed=00s  
  |++++++++++++++++++++++++++++++++++++++++++++++++++| 100% elapsed=01s  
Error: i In index: 1.
i With name: Consensus.
Caused by error in `CellChat::computeCommunProb()`:
! unused argument (do.fast = TRUE)

@jonhsussman, did you ever solve this issue?

dbdimitrov commented 10 months ago

It was an unused parameter from an old CellChat version that I was using in my pipeline, it is now removed and works with more recent CellChat versions.