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

could't able to add call_cellchat in liana_wrap #82

Closed soumenbera89 closed 1 year ago

soumenbera89 commented 1 year ago

Thank you so much for this nice tool. I am trying to use cellchat method using liana wrap but I getting error, although I am able to add other method. Could you please help regarding this error. I am using test data set.

cpdb_test1 <- liana_wrap(sce,

  • method = 'call_cellchat',
  • resource = c("CellPhoneDB"),
  • return_all = TRUE) Running LIANA with label as labels! Now Running: Call_cellchat Error: :information_source: In index: 1. :information_source: With name: CellPhoneDB. Caused by error in append(): ! unused argument (return_all = return_all)

secondly, I am not able to call the function get_cellphonedb, get_cytotalk

Thank you, Soumen.

dnjst commented 1 year ago

I had the exact same issue as well with latest 0.1.9 LIANA.

Now Running: Call_cellchat

Error: ℹ In index: 1.
ℹ With name: custom_resource.
Caused by error in `append()`:
! unused argument (return_all = return_all)

I love the return_all option BTW thank you for it and it would be great to use it with cellchat!

Is there any plan to re-implement cellchat's scoring as an internal liana function, or otherwise fix this to allow return_all?

dbdimitrov commented 1 year ago

Hi @soumenbera89 & @dnjst,

Indeed. This happens because this option will not work with CellChat, simply because it's being called externally.

Hmmm, allowing cellchat to return_all as other methods is not exactly feasible (at least not in a way that it would be consistent with the remainder of the methods).

I am considering to implement re-implement CellChat internally, but I'm concerned about it's computational speed in R. Specifically, the original CellChat implementation is in C.

I have however, implement a resource-agnostic version of CellChat in an efficient manner in liana-py. Overall, liana-py achieves performance to which R is not even close :)

I will clarify that return_all is intended only for internal methods, and will make sure that liana_wrap does not throw an exception when working with CellChat.

Thanks for using LIANA and I hope this helps!

Daniel