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

"call_cellchat" meet a error #68

Closed AIBio closed 1 year ago

AIBio commented 1 year ago

Hi,

I wanted to apply "call_cellchat" method to run example data you provided in tutorial. But I had a problem. Here is the output during running liana_wrap:

Now Running: Call_cellchat Create a CellChat object from a data matrix Set cell identities for the new CellChat object The cell groups used for CellChat analysis are B CD8 T NK 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=00s
|++++++++++++++++++++++++++++++++++++++++++++++++++| 100% elapsed=00s
|++++++++++++++++++++++++++++++++++++++++++++++++++| 100% elapsed=00s
|++++++++++++++++++++++++++++++++++++++++++++++++++| 100% elapsed=00s
|++++++++++++++++++++++++++++++++++++++++++++++++++| 100% elapsed=00s
|============================================================================================================================================================================| 100% Warning message: In exec(output, ...) : 3465 genes and/or 0 cells were removed as they had no counts!

The strange thing is that I am able to get the result, but I am having problems with the aggregation Here is the output during liana_aggregate

Error in liana_aggregate(.) : Please provide provide a name for the resource to be plucked and used to aggregate the method results!

I had read the help document of function liana_aggregate, but I do not known how to fix it. Could you give me a favor? Here is my running code:

library(tidyverse)
library(magrittr)
library(liana)
# Choose methods
method.to.use <- show_methods()
method.to.use <- setdiff(method.to.use, c("call_squidpy","call_connectome","call_sca","call_italk","call_natmi"))
# Load data
liana_path <- system.file(package = "liana")
testdata <-
  readRDS(file.path(liana_path , "testdata", "input", "testdata.rds"))
testdata %>% dplyr::glimpse()
# Run liana
liana_test <- liana_wrap(testdata, method = method.to.use)
liana_test %>% dplyr::glimpse()
# Aggregate and Obiain Consensus Ranks
liana_test <- liana_test %>%
  liana_aggregate(resource = "call_cellchat")

Best wishes,

Hanwen

dbdimitrov commented 1 year ago

Hi @AIBio,

The reason it crashes is that 'callcellchat' is not a resource. Also, to use the `call` methods I would suggest checking this vignette: https://saezlab.github.io/liana/articles/liana_devel.html

Though I would recommended just sticking to the ones re-implemented in liana (i.e. without call_ prefix, and you could additionally add call_cellchat to thos).

Hope this helps. Daniel

AIBio commented 1 year ago

Thank you ver much. I'll try it (https://saezlab.github.io/liana/articles/liana_devel.html)