liana icon indicating copy to clipboard operation
liana copied to clipboard

Comparing Results across conditions?

Open austinv11 opened this issue 2 years ago • 17 comments

Hello,

I was just wondering, some of the methods implemented in LIANA allow for comparing results across datasets (i.e. diseased vs normal) to see how signaling changes according to conditions. Is there any way to do that using LIANA? For instance CellChat has this tutorial: https://htmlpreview.github.io/?https://github.com/sqjin/CellChat/blob/master/tutorial/Comparison_analysis_of_multiple_datasets.html#load-cellchat-object-of-each-dataset-and-then-merge-together

If not possible, is there a way to get resource specific objects from the liana results so that I may run a similar analysis?

Thanks!

austinv11 avatar Apr 10 '22 19:04 austinv11

Hi @austinv11,

Currently, comparisons between conditions are not implemented in LIANA, but it is a planned extension that I hope to implement soon. Also, as far as I'm aware, CrossTalkeR supports LIANA input, if you want to give it a shot.

If I understood, correctly regarding the resources and by resources you refer to e.g. pathways, etc. Perhaps, this relatively basic tutorial will help: https://saezlab.github.io/liana/articles/liana_intracell.html

I plan to extend LIANA in these directions, and I will keep you posted.

Thanks, Daniel

dbdimitrov avatar Apr 11 '22 13:04 dbdimitrov

Just wondering whether this function is still being developed? Would be amazing if it was. Thanks :)

emily-003 avatar Jul 05 '22 13:07 emily-003

Hi @EJCresswell,

I have now implemented 2 ways of doing between condition comparisons, but we are still testing them. We really want to understand how to best approach this before I push them as tutorials.

It's the next planned update for liana.

Daniel

dbdimitrov avatar Jul 05 '22 17:07 dbdimitrov

Great- could you leave a comment on here when it's updated so that I get notified of the release? Thanks so much- looking forward to it! :)

emily-003 avatar Jul 06 '22 12:07 emily-003

Hey @austinv11 and @EJCresswell,

I created a draft tutorial for the integration of LIANA /w tensor-cell2cell. The tutorial is still preliminary as we want to extend it a bit, and consolidate the assumptions that we make as we build the tensor, but even now it's rather comprehensive.

This is currently implemented only on the dev branch, so you would need to install liana from there: https://github.com/saezlab/liana/tree/dev Code: https://github.com/saezlab/liana/blob/dev/vignettes/liana_cc2tensor.Rmd

The tutorial will be included in LIANA's next update, so you can also wait a bit and use it once done. However, in case you wish to beta-test, feedback would also be appreciated. :)

HTML /w how the tutorial would look once online: liana_cc2tensor.zip

dbdimitrov avatar Jul 13 '22 11:07 dbdimitrov

Hi thanks for this! I can't seem to download liana_1.0 though. This is the message that I'm getting:

remotes::install_github('saezlab/liana/liana_1.0') Downloading GitHub repo saezlab/liana@HEAD Error: Failed to install 'liana' from GitHub: Does not appear to be an R package (no DESCRIPTION)

emily-003 avatar Jul 18 '22 14:07 emily-003

Hi @EJCresswell

please try this command: remotes::install_github("saezlab/liana", ref="dev") :)

dbdimitrov avatar Jul 18 '22 14:07 dbdimitrov

Hi -thanks this has worked, but it's having other problems installing now

  • installing source package 'liana' ... ** using staged installation Warning in system("sh ./configure.win") : 'sh' not found ERROR: configuration failed for package 'liana'

emily-003 avatar Jul 18 '22 14:07 emily-003

@EJCresswell

Odd... I assume you should have .sh even on Windows - unless it's a very old version?

I assume you just need to install to prevent the error: https://cran.r-project.org/bin/windows/Rtools/rtools40.html

If you run: Sys.setenv(R_REMOTES_NO_ERRORS_FROM_WARNINGS = TRUE) Then it it would definitely install, but I don't think R will set up the needed environment, unless .sh is present.

dbdimitrov avatar Jul 18 '22 14:07 dbdimitrov

Depending on which R version you have: https://cran.r-project.org/bin/windows/Rtools/

dbdimitrov avatar Jul 18 '22 14:07 dbdimitrov

If this is the issue you should also see RTools (...) is not currently installed in the R terminal output as the package installs

dbdimitrov avatar Jul 18 '22 14:07 dbdimitrov

I've managed to install it now. Still getting error messages when trying to run the liana_bysample function though:

Error in [[<-(*tmp*, name, value = integer(0)) : 0 elements in value to replace 54708 elements

emily-003 avatar Jul 18 '22 15:07 emily-003

OK. Odd... Works just fine on my end (liana_bysample is just a loop that calls liana_wrap).

Could you please restart your r_session?

Just to make sure it's not some other package interfering and send me the session_info for me to try to reproduce the issue.

dbdimitrov avatar Jul 18 '22 15:07 dbdimitrov

You can also skip it if you run: context_df_dict <- readRDS(url("https://zenodo.org/record/6826420/files/pbmcs_lrs.RDS?download=1"))

These are the liana results by sample that liana_bysample returns.

dbdimitrov avatar Jul 18 '22 15:07 dbdimitrov

I've tried restarting the session and the code isn't working on my data still unfortunately

emily-003 avatar Jul 19 '22 13:07 emily-003

Hi @EJCresswell,

But does it work with the example data? Sharing your session_info() would allow me to attempt to traceback the issue :) Also, if it works with the example, but not with your data, you can share a subset of your data with me and I can try to trace.

Thanks for trying it out.

Daniel

dbdimitrov avatar Jul 19 '22 13:07 dbdimitrov

Please note that I have now moved these changes to the dev branch and updated my comments respectively.

dbdimitrov avatar Aug 11 '22 06:08 dbdimitrov

Hi took me a while to get to this, but finally a tutorial with cell2cell-tensor is available here: https://saezlab.github.io/liana/articles/liana_cc2tensor.html

Will close the issue. Feel free to open new ones, related to the vignette.

Daniel

dbdimitrov avatar Nov 10 '22 15:11 dbdimitrov