saezlab / liana

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

Errors from running liana_wrap with call_cellchat #33

Closed SBaek613 closed 2 years ago

SBaek613 commented 2 years ago

I have updated Liana to 0.1.0 version from 0.0.9. It seems like method 'cellchat' is not there anymore and 'call_cellchat' exists instead. First, does this mean that re-implemented version of cellchat would be no longer supported?

Then, I manually downloaded CellChat package with the newest version of 1.1.3 and igraph 1.3.1.

But it seems like there might be issue with graph functions since the error message states

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  NK_T CD8_GZMB CD8_GZMK
Error: Not a graph object

It seems to me that CellChat had some graph function updates going from 1.1.0 (version from the CellChat tutorial) to 1.1.3. Could that be the possible cause of this error?

I would really like to use CellChat along with other tools through LIANA. Could you please help me through this issue?

sessionInfo:

R version 4.1.3 (2022-03-10)
Platform: x86_64-conda-linux-gnu (64-bit)
Running under: Rocky Linux 8.5 (Green Obsidian)

Matrix products: default
BLAS/LAPACK: /home2/bsb0613/miniconda3/envs/CCI/lib/libopenblasp-r0.3.20.so

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C
 [3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8
 [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8
 [7] LC_PAPER=en_US.UTF-8       LC_NAME=C
 [9] LC_ADDRESS=C               LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C

attached base packages:
[1] grid      stats     graphics  grDevices utils     datasets  methods
[8] base

other attached packages:
 [1] ComplexHeatmap_2.10.0 circlize_0.4.14       NMF_0.24.0
 [4] cluster_2.1.3         rngtools_1.5.2        pkgmaker_0.32.2
 [7] registry_0.5-1        CellChat_1.1.3        igraph_1.3.1
[10] Biobase_2.54.0        BiocGenerics_0.40.0   SeuratObject_4.0.4
[13] Seurat_4.1.0          ktools_1.10.6         OmnipathR_3.3.23
[16] liana_0.1.0           magrittr_2.0.3        forcats_0.5.1
[19] stringr_1.4.0         dplyr_1.0.8           purrr_0.3.4
[22] readr_2.1.2           tidyr_1.2.0           tibble_3.1.6
[25] ggplot2_3.3.5         tidyverse_1.3.1

loaded via a namespace (and not attached):
  [1] rappdirs_0.3.3              scattermore_0.8
  [3] coda_0.19-4                 irlba_2.3.5
  [5] DelayedArray_0.20.0         data.table_1.14.2
  [7] rpart_4.1.16                RCurl_1.98-1.6
  [9] doParallel_1.0.17           generics_0.1.2
 [11] ScaledMatrix_1.2.0          callr_3.7.0
 [13] cowplot_1.1.1               usethis_2.1.5
 [15] RANN_2.6.1                  future_1.24.0
 [17] tzdb_0.3.0                  spatstat.data_2.2-0
 [19] xml2_1.3.3                  lubridate_1.8.0
 [21] httpuv_1.6.5                SummarizedExperiment_1.24.0
 [23] assertthat_0.2.1            viridis_0.6.2
 [25] hms_1.1.1                   promises_1.2.0.1
 [27] fansi_1.0.3                 progress_1.2.2
 [29] dbplyr_2.1.1                readxl_1.4.0
 [31] DBI_1.1.2                   htmlwidgets_1.5.4
 [33] spatstat.geom_2.4-0         stats4_4.1.3
 [35] ellipsis_0.3.2              RSpectra_0.16-0
 [37] backports_1.4.1             gridBase_0.4-7
 [39] deldir_1.0-6                sparseMatrixStats_1.6.0
 [41] MatrixGenerics_1.6.0        vctrs_0.4.1
 [43] SingleCellExperiment_1.16.0 ggalluvial_0.12.3
 [45] remotes_2.4.2               ROCR_1.0-11
 [47] entropy_1.3.1               abind_1.4-5
 [49] cachem_1.0.6                withr_2.5.0
 [51] checkmate_2.0.0             sctransform_0.3.3
 [53] sna_2.6                     prettyunits_1.1.1
 [55] scran_1.22.1                goftest_1.2-3
 [57] svglite_2.1.0               lazyeval_0.2.2
 [59] crayon_1.5.1                edgeR_3.36.0
 [61] pkgconfig_2.0.3             GenomeInfoDb_1.30.1
 [63] pkgload_1.2.4               nlme_3.1-157
 [65] vipor_0.4.5                 devtools_2.4.3
 [67] rlang_1.0.2                 globals_0.14.0
 [69] lifecycle_1.0.1             miniUI_0.1.1.1
 [71] modelr_0.1.8                rsvd_1.0.5
 [73] tcltk_4.1.3                 rprojroot_2.0.3
 [75] cellranger_1.1.0            polyclip_1.10-0
 [77] matrixStats_0.62.0          lmtest_0.9-40
 [79] Matrix_1.4-1                zoo_1.8-10
 [81] reprex_2.0.1                beeswarm_0.4.0
 [83] ggridges_0.5.3              GlobalOptions_0.1.2
 [85] processx_3.5.3              png_0.1-7
 [87] viridisLite_0.4.0           rjson_0.2.21
 [89] bitops_1.0-7                KernSmooth_2.23-20
 [91] DelayedMatrixStats_1.16.0   shape_1.4.6
 [93] parallelly_1.31.0           spatstat.random_2.2-0
 [95] S4Vectors_0.32.4            beachmat_2.10.0
 [97] scales_1.2.0                memoise_2.0.1
 [99] plyr_1.8.7                  ica_1.0-2
[101] zlibbioc_1.40.0             compiler_4.1.3
[103] dqrng_0.3.0                 RColorBrewer_1.1-3
[105] clue_0.3-60                 fitdistrplus_1.1-8
[107] cli_3.2.0                   XVector_0.34.0
[109] listenv_0.8.0               ps_1.6.0
[111] patchwork_1.1.1             pbapply_1.5-0
[113] MASS_7.3-56                 mgcv_1.8-40
[115] tidyselect_1.1.2            stringi_1.7.6
[117] yaml_2.3.5                  BiocSingular_1.10.0
[119] locfit_1.5-9.5              ggrepel_0.9.1
[121] tools_4.1.3                 future.apply_1.8.1
[123] parallel_4.1.3              rstudioapi_0.13
[125] bluster_1.4.0               foreach_1.5.2
[127] metapod_1.2.0               gridExtra_2.3
[129] Rtsne_0.16                  digest_0.6.29
[131] FNN_1.1.3                   shiny_1.7.1
[133] Rcpp_1.0.8.3                GenomicRanges_1.46.1
[135] broom_0.8.0                 scuttle_1.4.0
[137] later_1.3.0                 RcppAnnoy_0.0.19
[139] httr_1.4.2                  colorspace_2.0-3
[141] brio_1.1.3                  rvest_1.0.2
[143] fs_1.5.2                    tensor_1.5
[145] reticulate_1.24             IRanges_2.28.0
[147] splines_4.1.3               uwot_0.1.11
[149] statmod_1.4.36              spatstat.utils_2.3-0
[151] scater_1.22.0               sessioninfo_1.2.2
[153] plotly_4.10.0               systemfonts_1.0.4
[155] xtable_1.8-4                jsonlite_1.8.0
[157] testthat_3.1.3              R6_2.5.1
[159] pillar_1.7.0                htmltools_0.5.2
[161] mime_0.12                   glue_1.6.2
[163] fastmap_1.1.0               BiocParallel_1.28.3
[165] BiocNeighbors_1.12.0        codetools_0.2-18
[167] pkgbuild_1.3.1              utf8_1.2.2
[169] lattice_0.20-45             spatstat.sparse_2.1-1
[171] logger_0.2.2                network_1.17.1
[173] curl_4.3.2                  ggbeeswarm_0.6.0
[175] leiden_0.3.9                survival_3.3-1
[177] limma_3.50.3                statnet.common_4.5.0
[179] desc_1.4.1                  munsell_0.5.0
[181] GetoptLong_1.0.5            GenomeInfoDbData_1.2.7
[183] iterators_1.0.14            haven_2.5.0
[185] reshape2_1.4.4              gtable_0.3.0
[187] spatstat.core_2.4-2
dbdimitrov commented 2 years ago

Hi @bsb0613,

Thanks for raising this issue. I have now explicitly added the fact that I changed CellChat and Squidpy to 'call_*' methods. I did this change for consistency with the remainder of the 'external' pipelines.

Indeed, I do not plan to tailor the future developments of liana to external methods. Although, CellChat is a very well thought and comprehensive method, when limited to LR inference alone, it seems redundant to have both CellPhoneDB and CellChat (both are permutation-based). Nevertheless, I do plan to continue supporting any issues related to CellChat.

As you suggested, I updated my CellChat version to the latest, but it successfully ran via LIANA. So, it might be an issue specific to your dataset.

I saw an issue raised by @paulyashna on the same topic: https://github.com/sqjin/CellChat/issues/381

Perhaps, if one of you could share a subset of your data, I could double check on my side.

SBaek613 commented 2 years ago

I am not sure what would be the best way to share a file on github but here I attached google drive link to a subset of my data with 10k cells. It's a Seurat Object (in RDS) with celltypes annotated as 'celltype'. You would probably need Seurat v4 to load this data.

I used command

result <- liana_wrap(
    Seurat_sub,
    method = c("call_cellchat"),
    resource = "Consensus",
    idents_col = "celltype",
    assay = "RNA",
    parallelize = TRUE,
    workers = 10
)

which gave me error messsage

Expression from the `RNA` assay will be used
Running LIANA with `celltype` as labels!
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  NK_T CD8_GZMB CD8_GZMK
Error: Not a graph object
Warning message:
In .filter_sce(sce) :
  4378 genes and/or 0 cells were removed as they had no counts!

'Not a graph object' error seems to pop up if you try to put anything other than graph object into igraph functions.

Thank you

https://drive.google.com/file/d/1Ri8IFJR-B8VOgFS4dWciFt1ODe83qCKa/view?usp=sharing

dbdimitrov commented 2 years ago

Hi @bsb0613,

I was able to run cellchat via LIANA with the object that you provided.

Note that to pass parameters to cellchat you should do the following (but I don't think it would be quicker when you parallelize with so few clusters, likely it would be slower):

liana_res <- liana_wrap(testdata,
                        method="call_cellchat",
                        idents_col = "celltype",
                        cellchat.params = list(.do_parallel=TRUE))

I assumed it might be related to the object conversion, but I tested with the same CellChat, Seurat, SeuratObject and igraph versions. So, I'm really sure where this issue stems from.

What is your output for rlang::last_trace()?


> sessioninfo::session_info()
─ Session info ────────────────────────────────────────────────────────────────────────────────────────────────────
 setting  value
 version  R version 4.0.3 (2020-10-10)
 os       Ubuntu 20.04.4 LTS
 system   x86_64, linux-gnu
 ui       RStudio
 language en_US
 collate  en_US.UTF-8
 ctype    en_US.UTF-8
 tz       Europe/Brussels
 date     2022-04-22
 rstudio  1.4.1717 Juliet Rose (desktop)
 pandoc   NA

─ Packages ────────────────────────────────────────────────────────────────────────────────────────────────────────
 ! package              * version  date (UTC) lib source
 P abind                  1.4-5    2016-07-21 [?] CRAN (R 4.0.2)
   assertthat             0.2.1    2019-03-21 [1] CRAN (R 4.0.3)
 P backports              1.4.1    2021-12-13 [?] CRAN (R 4.0.3)
   beachmat               2.6.4    2020-12-20 [1] Bioconductor
   Biobase              * 2.50.0   2020-10-27 [1] Bioconductor
   BiocGenerics         * 0.36.1   2021-04-16 [1] Bioconductor
   BiocNeighbors          1.8.2    2020-12-07 [1] Bioconductor
   BiocParallel           1.24.1   2020-11-06 [1] Bioconductor
   BiocSingular           1.6.0    2020-10-27 [1] Bioconductor
   bitops                 1.0-7    2021-04-24 [1] CRAN (R 4.0.3)
   bluster                1.0.0    2020-10-27 [1] Bioconductor
 P broom                  0.8.0    2022-04-13 [?] CRAN (R 4.0.3)
   Cairo                  1.5-15   2022-03-16 [1] CRAN (R 4.0.3)
   CellChat               1.1.3    2022-04-22 [1] Github (sqjin/CellChat@6ff060d)
 P cellranger             1.1.0    2016-07-27 [?] CRAN (R 4.0.2)
   circlize               0.4.14   2022-02-11 [1] CRAN (R 4.0.3)
   cli                    3.2.0    2022-02-14 [1] CRAN (R 4.0.3)
   clue                   0.3-60   2021-10-11 [1] CRAN (R 4.0.3)
   cluster                2.1.0    2019-06-19 [2] CRAN (R 4.0.0)
   coda                   0.19-4   2020-09-30 [1] CRAN (R 4.0.3)
   codetools              0.2-16   2018-12-24 [2] CRAN (R 4.0.0)
   colorspace             2.0-3    2022-02-21 [1] CRAN (R 4.0.3)
   ComplexHeatmap         2.6.2    2020-11-12 [1] Bioconductor
   cowplot                1.1.1    2020-12-30 [1] CRAN (R 4.0.3)
   crayon                 1.5.1    2022-03-26 [1] CRAN (R 4.0.3)
 P data.table             1.14.2   2021-09-27 [?] CRAN (R 4.0.3)
 P DBI                    1.1.2    2021-12-20 [?] CRAN (R 4.0.3)
 P dbplyr                 2.1.1    2021-04-06 [?] CRAN (R 4.0.3)
   DelayedArray           0.16.3   2021-03-24 [1] Bioconductor
   DelayedMatrixStats     1.12.3   2021-02-03 [1] Bioconductor
 P deldir                 1.0-6    2021-10-23 [?] CRAN (R 4.0.3)
   digest                 0.6.29   2021-12-01 [1] CRAN (R 4.0.3)
   doParallel             1.0.17   2022-02-07 [1] CRAN (R 4.0.3)
   dplyr                * 1.0.8    2022-02-08 [1] CRAN (R 4.0.3)
   dqrng                  0.3.0    2021-05-01 [1] CRAN (R 4.0.3)
   edgeR                  3.32.1   2021-01-14 [1] Bioconductor
   ellipsis               0.3.2    2021-04-29 [1] CRAN (R 4.0.3)
   fansi                  1.0.3    2022-03-24 [1] CRAN (R 4.0.3)
 P fastmap                1.1.0    2021-01-25 [?] CRAN (R 4.0.3)
 P fitdistrplus           1.1-8    2022-03-10 [?] CRAN (R 4.0.3)
   FNN                    1.1.3    2019-02-15 [1] CRAN (R 4.0.3)
   forcats              * 0.5.1    2021-01-27 [1] CRAN (R 4.0.3)
   foreach                1.5.2    2022-02-02 [1] CRAN (R 4.0.3)
 P fs                     1.5.2    2021-12-08 [?] CRAN (R 4.0.3)
   future                 1.24.0   2022-02-19 [1] CRAN (R 4.0.3)
   future.apply           1.8.1    2021-08-10 [1] CRAN (R 4.0.3)
   generics               0.1.2    2022-01-31 [1] CRAN (R 4.0.3)
   GenomeInfoDb           1.26.7   2021-04-08 [1] Bioconductor
   GenomeInfoDbData       1.2.4    2022-04-22 [1] Bioconductor
   GenomicRanges          1.42.0   2020-10-27 [1] Bioconductor
   GetoptLong             1.0.5    2020-12-15 [1] CRAN (R 4.0.3)
   ggalluvial             0.12.3   2020-12-05 [1] CRAN (R 4.0.3)
   ggplot2              * 3.3.5    2021-06-25 [1] CRAN (R 4.0.3)
   ggrepel                0.9.1    2021-01-15 [1] CRAN (R 4.0.3)
 P ggridges               0.5.3    2021-01-08 [?] CRAN (R 4.0.3)
   GlobalOptions          0.1.2    2020-06-10 [1] CRAN (R 4.0.3)
   globals                0.14.0   2020-11-22 [1] CRAN (R 4.0.3)
   glue                   1.6.2    2022-02-24 [1] CRAN (R 4.0.3)
 P goftest                1.2-3    2021-10-07 [?] CRAN (R 4.0.3)
   gridBase               0.4-7    2014-02-24 [1] CRAN (R 4.0.3)
   gridExtra              2.3      2017-09-09 [1] CRAN (R 4.0.3)
   gtable                 0.3.0    2019-03-25 [1] CRAN (R 4.0.3)
 P haven                  2.5.0    2022-04-15 [?] CRAN (R 4.0.3)
   hms                    1.1.1    2021-09-26 [1] CRAN (R 4.0.3)
 P htmltools              0.5.2    2021-08-25 [?] CRAN (R 4.0.3)
 P htmlwidgets            1.5.4    2021-09-08 [?] CRAN (R 4.0.3)
 P httpuv                 1.6.5    2022-01-05 [?] CRAN (R 4.0.3)
 P httr                   1.4.2    2020-07-20 [?] CRAN (R 4.0.2)
 P ica                    1.0-2    2018-05-24 [?] CRAN (R 4.0.2)
   igraph                 1.3.1    2022-04-20 [1] CRAN (R 4.0.3)
   IRanges                2.24.1   2020-12-12 [1] Bioconductor
   irlba                  2.3.5    2021-12-06 [1] CRAN (R 4.0.3)
   iterators              1.0.14   2022-02-05 [1] CRAN (R 4.0.3)
   jsonlite               1.8.0    2022-02-22 [1] CRAN (R 4.0.3)
   KernSmooth             2.23-17  2020-04-26 [2] CRAN (R 4.0.0)
 P later                  1.3.0    2021-08-18 [?] CRAN (R 4.0.3)
   lattice                0.20-41  2020-04-02 [2] CRAN (R 4.0.0)
   lazyeval               0.2.2    2019-03-15 [1] CRAN (R 4.0.3)
 P leiden                 0.3.9    2021-07-27 [?] CRAN (R 4.0.3)
   liana                * 0.1.0    2022-04-22 [1] Github (saezlab/liana@7858d41)
   lifecycle              1.0.1    2021-09-24 [1] CRAN (R 4.0.3)
   limma                  3.46.0   2020-10-27 [1] Bioconductor
   listenv                0.8.0    2019-12-05 [1] CRAN (R 4.0.3)
 P lmtest                 0.9-40   2022-03-21 [?] CRAN (R 4.0.3)
   locfit                 1.5-9.2  2020-03-23 [1] local (~/Downloads/locfit_1.5-9.2.tar.gz)
 P lubridate              1.8.0    2021-10-07 [?] CRAN (R 4.0.3)
   magrittr               2.0.3    2022-03-30 [1] CRAN (R 4.0.3)
   MASS                   7.3-53   2020-09-09 [2] CRAN (R 4.0.2)
   Matrix                 1.4-1    2022-03-23 [1] CRAN (R 4.0.3)
   MatrixGenerics         1.2.1    2021-01-30 [1] Bioconductor
   matrixStats            0.62.0   2022-04-19 [1] CRAN (R 4.0.3)
   mgcv                   1.8-33   2020-08-27 [2] CRAN (R 4.0.2)
 P mime                   0.12     2021-09-28 [?] CRAN (R 4.0.3)
 P miniUI                 0.1.1.1  2018-05-18 [?] CRAN (R 4.0.2)
 P modelr                 0.1.8    2020-05-19 [?] CRAN (R 4.0.2)
   munsell                0.5.0    2018-06-12 [1] CRAN (R 4.0.3)
   network                1.17.1   2021-06-14 [1] CRAN (R 4.0.3)
   nlme                   3.1-149  2020-08-23 [2] CRAN (R 4.0.2)
   NMF                    0.24.0   2022-03-29 [1] CRAN (R 4.0.3)
   OmnipathR              2.0.0    2020-10-27 [1] Bioconductor
   parallelly             1.31.0   2022-04-07 [1] CRAN (R 4.0.3)
   patchwork              1.1.1    2020-12-17 [1] CRAN (R 4.0.3)
   pbapply                1.5-0    2021-09-16 [1] CRAN (R 4.0.3)
   pillar                 1.7.0    2022-02-01 [1] CRAN (R 4.0.3)
   pkgconfig              2.0.3    2019-09-22 [1] CRAN (R 4.0.3)
   pkgmaker               0.32.2   2020-10-20 [1] CRAN (R 4.0.3)
 P plotly                 4.10.0   2021-10-09 [?] CRAN (R 4.0.3)
   plyr                   1.8.7    2022-03-24 [1] CRAN (R 4.0.3)
   png                    0.1-7    2013-12-03 [1] CRAN (R 4.0.3)
 P polyclip               1.10-0   2019-03-14 [?] CRAN (R 4.0.2)
 P promises               1.2.0.1  2021-02-11 [?] CRAN (R 4.0.3)
   purrr                * 0.3.4    2020-04-17 [1] CRAN (R 4.0.3)
   R6                     2.5.1    2021-08-19 [1] CRAN (R 4.0.3)
 P RANN                   2.6.1    2019-01-08 [?] CRAN (R 4.0.2)
   RColorBrewer           1.1-3    2022-04-03 [1] CRAN (R 4.0.3)
   Rcpp                   1.0.8.3  2022-03-17 [1] CRAN (R 4.0.3)
 P RcppAnnoy              0.0.19   2021-07-30 [?] CRAN (R 4.0.3)
   RCurl                  1.98-1.6 2022-02-08 [1] CRAN (R 4.0.3)
   readr                * 2.1.2    2022-01-30 [1] CRAN (R 4.0.3)
 P readxl                 1.4.0    2022-03-28 [?] CRAN (R 4.0.3)
   registry               0.5-1    2019-03-05 [1] CRAN (R 4.0.3)
   renv                   0.15.4   2022-03-03 [1] CRAN (R 4.0.3)
 P reprex                 2.0.1    2021-08-05 [?] CRAN (R 4.0.3)
   reshape2               1.4.4    2020-04-09 [1] CRAN (R 4.0.3)
   reticulate             1.24     2022-01-26 [1] CRAN (R 4.0.3)
   rjson                  0.2.21   2022-01-09 [1] CRAN (R 4.0.3)
   rlang                  1.0.2    2022-03-04 [1] CRAN (R 4.0.3)
   rngtools               1.5.2    2021-09-20 [1] CRAN (R 4.0.3)
 P ROCR                   1.0-11   2020-05-02 [?] CRAN (R 4.0.2)
   rpart                  4.1-15   2019-04-12 [2] CRAN (R 4.0.0)
   RSpectra               0.16-0   2019-12-01 [1] CRAN (R 4.0.3)
 P rstudioapi             0.13     2020-11-12 [?] CRAN (R 4.0.2)
   rsvd                   1.0.5    2021-04-16 [1] CRAN (R 4.0.3)
   Rtsne                  0.16     2022-04-17 [1] CRAN (R 4.0.3)
 P rvest                  1.0.2    2021-10-16 [?] CRAN (R 4.0.3)
   S4Vectors              0.28.1   2020-12-09 [1] Bioconductor
   scales                 1.2.0    2022-04-13 [1] CRAN (R 4.0.3)
 P scattermore            0.8      2022-02-14 [?] CRAN (R 4.0.3)
   scran                  1.18.7   2022-04-22 [1] bioc_xgit (@5849abc)
 P sctransform            0.3.3    2022-01-13 [?] CRAN (R 4.0.3)
   scuttle                1.0.4    2020-12-17 [1] Bioconductor
 P sessioninfo            1.2.2    2021-12-06 [?] CRAN (R 4.0.3)
 P Seurat               * 4.1.0    2022-01-14 [?] CRAN (R 4.0.3)
 P SeuratObject         * 4.0.4    2021-11-23 [?] CRAN (R 4.0.3)
   shape                  1.4.6    2021-05-19 [1] CRAN (R 4.0.3)
 P shiny                  1.7.1    2021-10-02 [?] CRAN (R 4.0.3)
   SingleCellExperiment   1.12.0   2022-04-22 [1] bioc_xgit (@66063b7)
   sna                    2.6      2020-10-06 [1] CRAN (R 4.0.3)
   sparseMatrixStats      1.2.1    2021-02-02 [1] Bioconductor
 P spatstat.core          2.4-2    2022-04-01 [?] CRAN (R 4.0.3)
 P spatstat.data          2.2-0    2022-04-18 [?] CRAN (R 4.0.3)
 P spatstat.geom          2.4-0    2022-03-29 [?] CRAN (R 4.0.3)
 P spatstat.random        2.2-0    2022-03-30 [?] CRAN (R 4.0.3)
 P spatstat.sparse        2.1-1    2022-04-18 [?] CRAN (R 4.0.3)
 P spatstat.utils         2.3-0    2021-12-12 [?] CRAN (R 4.0.3)
   statmod                1.4.36   2021-05-10 [1] CRAN (R 4.0.3)
   statnet.common         4.5.0    2021-06-05 [1] CRAN (R 4.0.3)
   stringi                1.7.6    2021-11-29 [1] CRAN (R 4.0.3)
   stringr              * 1.4.0    2019-02-10 [1] CRAN (R 4.0.3)
   SummarizedExperiment   1.20.0   2020-10-27 [1] Bioconductor
   survival               3.2-7    2020-09-28 [2] CRAN (R 4.0.2)
   svglite                2.1.0    2022-02-03 [1] CRAN (R 4.0.3)
   systemfonts            1.0.4    2022-02-11 [1] CRAN (R 4.0.3)
 P tensor                 1.5      2012-05-05 [?] CRAN (R 4.0.2)
   tibble               * 3.1.6    2021-11-07 [1] CRAN (R 4.0.3)
   tidyr                * 1.2.0    2022-02-01 [1] CRAN (R 4.0.3)
   tidyselect             1.1.2    2022-02-21 [1] CRAN (R 4.0.3)
 P tidyverse            * 1.3.1    2021-04-15 [?] CRAN (R 4.0.3)
   tzdb                   0.3.0    2022-03-28 [1] CRAN (R 4.0.3)
   utf8                   1.2.2    2021-07-24 [1] CRAN (R 4.0.3)
 P uwot                   0.1.11   2021-12-02 [?] CRAN (R 4.0.3)
   vctrs                  0.4.1    2022-04-13 [1] CRAN (R 4.0.3)
   viridisLite            0.4.0    2021-04-13 [1] CRAN (R 4.0.3)
   withr                  2.5.0    2022-03-03 [1] CRAN (R 4.0.3)
 P xml2                   1.3.3    2021-11-30 [?] CRAN (R 4.0.3)
   xtable                 1.8-4    2019-04-21 [1] CRAN (R 4.0.3)
   XVector                0.30.0   2020-10-27 [1] Bioconductor
   zlibbioc               1.36.0   2020-10-27 [1] Bioconductor
 P zoo                    1.8-10   2022-04-15 [?] CRAN (R 4.0.3)

 [1] /home/dbdimitrov/Repos/test_cellchat/renv/library/R-4.0/x86_64-pc-linux-gnu
 [2] /usr/lib/R/library

 P ── Loaded and on-disk path mismatch.

───────────────────────────────────────────────────────────────────────────────────────────────────────────────────```
SBaek613 commented 2 years ago

This is very strange. I have exact same packages and versions loaded to R. One notable difference is the versions of OmnipathR (yours 2.0 while mine is 3.3.23), but I don't think that would affect the results?

I guess I am on R 4.1.3 but would that be a lot different from 4.0.3?

The versions of liana is the same but yours is 'saezlab/liana@7858d41' while mine is 'saezlab/liana@6b98c36.' I don't know much about this github naming stuff but should I try to get your version of liana somehow?

Doing rlang::last_trace() doesn't really display anything (with or without loading CellChat as described below)

> rlang::last_trace()
Error: Can't show last error because no error was recorded yet

Error messages from running liana_wrap varies depending on whether I loaded CellChat or not. Without loading, there is basically no error message

> result2 <- liana_wrap(
+     Seurat_sub,
+     method = "call_cellchat",
+     # resource = "Consensus",
+     idents_col = "celltype"
+     # assay = "RNA",
+     # parallelize = TRUE,
+     # workers = 10
+ )
Expression from the `RNA` assay will be used
Running LIANA with `celltype` as labels!
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  NK_T CD8_GZMB CD8_GZMK
Error:
Warning messages:
1: In .filter_sce(sce) :
  4378 genes and/or 0 cells were removed as they had no counts!
2: `invoke()` is deprecated as of rlang 0.4.0.
Please use `exec()` or `inject()` instead.
This warning is displayed once per session.

and with CellChat loaded, error message is the same as on my previous comments.

here is my session info

> sessioninfo::session_info()
─ Session info ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
 setting  value
 version  R version 4.1.3 (2022-03-10)
 os       Rocky Linux 8.5 (Green Obsidian)
 system   x86_64, linux-gnu
 ui       X11
 language (EN)
 collate  en_US.UTF-8
 ctype    en_US.UTF-8
 tz       Asia/Seoul
 date     2022-04-23
 pandoc   NA

─ Packages ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
 package              * version  date (UTC) lib source
 abind                  1.4-5    2016-07-21 [1] CRAN (R 4.1.3)
 assertthat             0.2.1    2019-03-21 [1] CRAN (R 4.1.3)
 backports              1.4.1    2021-12-13 [1] CRAN (R 4.1.3)
 beachmat               2.10.0   2021-10-26 [1] Bioconductor
 Biobase              * 2.54.0   2021-10-26 [1] Bioconductor
 BiocGenerics         * 0.40.0   2021-10-26 [1] Bioconductor
 BiocNeighbors          1.12.0   2021-10-26 [1] Bioconductor
 BiocParallel           1.28.3   2021-12-09 [1] Bioconductor
 BiocSingular           1.10.0   2021-10-26 [1] Bioconductor
 bitops                 1.0-7    2021-04-24 [1] CRAN (R 4.1.3)
 bluster                1.4.0    2021-10-26 [1] Bioconductor
 broom                  0.8.0    2022-04-13 [1] CRAN (R 4.1.3)
 CellChat               1.1.3    2022-04-20 [1] Github (sqjin/CellChat@6ff060d)
 cellranger             1.1.0    2016-07-27 [1] CRAN (R 4.1.3)
 checkmate              2.0.0    2020-02-06 [1] CRAN (R 4.1.3)
 circlize               0.4.14   2022-02-11 [1] CRAN (R 4.1.3)
 cli                    3.2.0    2022-02-14 [1] CRAN (R 4.1.3)
 clue                   0.3-60   2021-10-11 [1] CRAN (R 4.1.3)
 cluster                2.1.3    2022-03-28 [1] CRAN (R 4.1.3)
 coda                   0.19-4   2020-09-30 [1] CRAN (R 4.1.3)
 codetools              0.2-18   2020-11-04 [1] CRAN (R 4.1.3)
 colorspace             2.0-3    2022-02-21 [1] CRAN (R 4.1.3)
 ComplexHeatmap         2.10.0   2021-10-26 [1] Bioconductor
 cowplot                1.1.1    2020-12-30 [1] CRAN (R 4.1.3)
 crayon                 1.5.1    2022-03-26 [1] CRAN (R 4.1.3)
 curl                   4.3.2    2021-06-23 [1] CRAN (R 4.1.0)
 data.table             1.14.2   2021-09-27 [1] CRAN (R 4.1.3)
 DBI                    1.1.2    2021-12-20 [1] CRAN (R 4.1.3)
 dbplyr                 2.1.1    2021-04-06 [1] CRAN (R 4.1.3)
 DelayedArray           0.20.0   2021-10-26 [1] Bioconductor
 DelayedMatrixStats     1.16.0   2021-10-26 [1] Bioconductor
 deldir                 1.0-6    2021-10-23 [1] CRAN (R 4.1.3)
 digest                 0.6.29   2021-12-01 [1] CRAN (R 4.1.3)
 doParallel             1.0.17   2022-02-07 [1] CRAN (R 4.1.3)
 dplyr                * 1.0.8    2022-02-08 [1] CRAN (R 4.1.3)
 dqrng                  0.3.0    2021-05-01 [1] CRAN (R 4.1.3)
 edgeR                  3.36.0   2021-10-26 [1] Bioconductor
 ellipsis               0.3.2    2021-04-29 [1] CRAN (R 4.1.3)
 fansi                  1.0.3    2022-03-24 [1] CRAN (R 4.1.3)
 fastmap                1.1.0    2021-01-25 [1] CRAN (R 4.1.3)
 fitdistrplus           1.1-8    2022-03-10 [1] CRAN (R 4.1.3)
 FNN                    1.1.3    2019-02-15 [1] CRAN (R 4.1.3)
 forcats              * 0.5.1    2021-01-27 [1] CRAN (R 4.1.3)
 foreach                1.5.2    2022-02-02 [1] CRAN (R 4.1.3)
 fs                     1.5.2    2021-12-08 [1] CRAN (R 4.1.3)
 future                 1.24.0   2022-02-19 [1] CRAN (R 4.1.3)
 future.apply           1.8.1    2021-08-10 [1] CRAN (R 4.1.3)
 generics               0.1.2    2022-01-31 [1] CRAN (R 4.1.3)
 GenomeInfoDb           1.30.1   2022-01-30 [1] Bioconductor
 GenomeInfoDbData       1.2.7    2022-04-20 [1] Bioconductor
 GenomicRanges          1.46.1   2021-11-18 [1] Bioconductor
 GetoptLong             1.0.5    2020-12-15 [1] CRAN (R 4.1.3)
 ggalluvial             0.12.3   2020-12-05 [1] CRAN (R 4.1.3)
 ggplot2              * 3.3.5    2021-06-25 [1] CRAN (R 4.1.3)
 ggrepel                0.9.1    2021-01-15 [1] CRAN (R 4.1.3)
 ggridges               0.5.3    2021-01-08 [1] CRAN (R 4.1.3)
 GlobalOptions          0.1.2    2020-06-10 [1] CRAN (R 4.1.3)
 globals                0.14.0   2020-11-22 [1] CRAN (R 4.1.3)
 glue                   1.6.2    2022-02-24 [1] CRAN (R 4.1.3)
 goftest                1.2-3    2021-10-07 [1] CRAN (R 4.1.3)
 gridBase               0.4-7    2014-02-24 [1] CRAN (R 4.1.3)
 gridExtra              2.3      2017-09-09 [1] CRAN (R 4.1.3)
 gtable                 0.3.0    2019-03-25 [1] CRAN (R 4.1.3)
 haven                  2.5.0    2022-04-15 [1] CRAN (R 4.1.3)
 hms                    1.1.1    2021-09-26 [1] CRAN (R 4.1.3)
 htmltools              0.5.2    2021-08-25 [1] CRAN (R 4.1.3)
 htmlwidgets            1.5.4    2021-09-08 [1] CRAN (R 4.1.3)
 httpuv                 1.6.5    2022-01-05 [1] CRAN (R 4.1.3)
 httr                   1.4.2    2020-07-20 [1] CRAN (R 4.1.3)
 ica                    1.0-2    2018-05-24 [1] CRAN (R 4.1.3)
 igraph                 1.3.1    2022-04-20 [1] CRAN (R 4.1.3)
 IRanges                2.28.0   2021-10-26 [1] Bioconductor
 irlba                  2.3.5    2021-12-06 [1] CRAN (R 4.1.3)
 iterators              1.0.14   2022-02-05 [1] CRAN (R 4.1.3)
 jsonlite               1.8.0    2022-02-22 [1] CRAN (R 4.1.2)
 KernSmooth             2.23-20  2021-05-03 [1] CRAN (R 4.1.3)
 ktools               * 1.10.6   2022-04-20 [1] Github (Kudusch/ktools@808c002)
 later                  1.3.0    2021-08-18 [1] CRAN (R 4.1.3)
 lattice                0.20-45  2021-09-22 [1] CRAN (R 4.1.3)
 lazyeval               0.2.2    2019-03-15 [1] CRAN (R 4.1.3)
 leiden                 0.3.9    2021-07-27 [1] CRAN (R 4.1.3)
 liana                * 0.1.0    2022-04-20 [1] Github (saezlab/liana@6b98c36)
 lifecycle              1.0.1    2021-09-24 [1] CRAN (R 4.1.3)
 limma                  3.50.3   2022-04-07 [1] Bioconductor
 listenv                0.8.0    2019-12-05 [1] CRAN (R 4.1.3)
 lmtest                 0.9-40   2022-03-21 [1] CRAN (R 4.1.3)
 locfit                 1.5-9.5  2022-03-03 [1] CRAN (R 4.1.3)
 logger                 0.2.2    2021-10-19 [1] CRAN (R 4.1.3)
 lubridate              1.8.0    2021-10-07 [1] CRAN (R 4.1.3)
 magrittr               2.0.3    2022-03-30 [1] CRAN (R 4.1.3)
 MASS                   7.3-56   2022-03-23 [1] CRAN (R 4.1.3)
 Matrix                 1.4-1    2022-03-23 [1] CRAN (R 4.1.3)
 MatrixGenerics         1.6.0    2021-10-26 [1] Bioconductor
 matrixStats            0.62.0   2022-04-19 [1] CRAN (R 4.1.3)
 metapod                1.2.0    2021-10-26 [1] Bioconductor
 mgcv                   1.8-40   2022-03-29 [1] CRAN (R 4.1.3)
 mime                   0.12     2021-09-28 [1] CRAN (R 4.1.3)
 miniUI                 0.1.1.1  2018-05-18 [1] CRAN (R 4.1.3)
 modelr                 0.1.8    2020-05-19 [1] CRAN (R 4.1.3)
 munsell                0.5.0    2018-06-12 [1] CRAN (R 4.1.3)
 network                1.17.1   2021-06-14 [1] CRAN (R 4.1.3)
 nlme                   3.1-157  2022-03-25 [1] CRAN (R 4.1.3)
 NMF                    0.24.0   2022-03-29 [1] CRAN (R 4.1.3)
 OmnipathR              3.3.23   2022-04-20 [1] Github (saezlab/OmnipathR@1785827)
 parallelly             1.31.0   2022-04-07 [1] CRAN (R 4.1.3)
 patchwork              1.1.1    2020-12-17 [1] CRAN (R 4.1.3)
 pbapply                1.5-0    2021-09-16 [1] CRAN (R 4.1.3)
 pillar                 1.7.0    2022-02-01 [1] CRAN (R 4.1.3)
 pkgconfig              2.0.3    2019-09-22 [1] CRAN (R 4.1.3)
 pkgmaker               0.32.2   2020-10-20 [1] CRAN (R 4.1.3)
 plotly                 4.10.0   2021-10-09 [1] CRAN (R 4.1.3)
 plyr                   1.8.7    2022-03-24 [1] CRAN (R 4.1.3)
 png                    0.1-7    2013-12-03 [1] CRAN (R 4.1.3)
 polyclip               1.10-0   2019-03-14 [1] CRAN (R 4.1.3)
 prettyunits            1.1.1    2020-01-24 [1] CRAN (R 4.1.3)
 progress               1.2.2    2019-05-16 [1] CRAN (R 4.1.3)
 promises               1.2.0.1  2021-02-11 [1] CRAN (R 4.1.3)
 purrr                * 0.3.4    2020-04-17 [1] CRAN (R 4.1.3)
 R6                     2.5.1    2021-08-19 [1] CRAN (R 4.1.3)
 RANN                   2.6.1    2019-01-08 [1] CRAN (R 4.1.3)
 rappdirs               0.3.3    2021-01-31 [1] CRAN (R 4.1.3)
 RColorBrewer           1.1-3    2022-04-03 [1] CRAN (R 4.1.3)
 Rcpp                   1.0.8.3  2022-03-17 [1] CRAN (R 4.1.3)
 RcppAnnoy              0.0.19   2021-07-30 [1] CRAN (R 4.1.3)
 RCurl                  1.98-1.6 2022-02-08 [1] CRAN (R 4.1.3)
 readr                * 2.1.2    2022-01-30 [1] CRAN (R 4.1.3)
 readxl                 1.4.0    2022-03-28 [1] CRAN (R 4.1.3)
 registry               0.5-1    2019-03-05 [1] CRAN (R 4.1.3)
 reprex                 2.0.1    2021-08-05 [1] CRAN (R 4.1.3)
 reshape2               1.4.4    2020-04-09 [1] CRAN (R 4.1.3)
 reticulate             1.24     2022-01-26 [1] CRAN (R 4.1.3)
 rjson                  0.2.21   2022-01-09 [1] CRAN (R 4.1.3)
 rlang                  1.0.2    2022-03-04 [1] CRAN (R 4.1.3)
 rngtools               1.5.2    2021-09-20 [1] CRAN (R 4.1.3)
 ROCR                   1.0-11   2020-05-02 [1] CRAN (R 4.1.3)
 rpart                  4.1.16   2022-01-24 [1] CRAN (R 4.1.3)
 RSpectra               0.16-0   2019-12-01 [1] CRAN (R 4.1.3)
 rstudioapi             0.13     2020-11-12 [1] CRAN (R 4.1.0)
 rsvd                   1.0.5    2021-04-16 [1] CRAN (R 4.1.3)
 Rtsne                  0.16     2022-04-17 [1] CRAN (R 4.1.3)
 rvest                  1.0.2    2021-10-16 [1] CRAN (R 4.1.3)
 S4Vectors              0.32.4   2022-03-24 [1] Bioconductor
 ScaledMatrix           1.2.0    2021-10-26 [1] Bioconductor
 scales                 1.2.0    2022-04-13 [1] CRAN (R 4.1.3)
 scattermore            0.8      2022-02-14 [1] CRAN (R 4.1.3)
 scran                  1.22.1   2021-11-14 [1] Bioconductor
 sctransform            0.3.3    2022-01-13 [1] CRAN (R 4.1.3)
 scuttle                1.4.0    2021-10-26 [1] Bioconductor
 sessioninfo            1.2.2    2021-12-06 [1] CRAN (R 4.1.3)
 Seurat               * 4.1.0    2022-01-14 [1] CRAN (R 4.1.3)
 SeuratObject         * 4.0.4    2021-11-23 [1] CRAN (R 4.1.3)
 shape                  1.4.6    2021-05-19 [1] CRAN (R 4.1.3)
 shiny                  1.7.1    2021-10-02 [1] CRAN (R 4.1.3)
 SingleCellExperiment   1.16.0   2021-10-26 [1] Bioconductor
 sna                    2.6      2020-10-06 [1] CRAN (R 4.1.3)
 sparseMatrixStats      1.6.0    2021-10-26 [1] Bioconductor
 spatstat.core          2.4-2    2022-04-01 [1] CRAN (R 4.1.3)
 spatstat.data          2.2-0    2022-04-18 [1] CRAN (R 4.1.3)
 spatstat.geom          2.4-0    2022-03-29 [1] CRAN (R 4.1.3)
 spatstat.random        2.2-0    2022-03-30 [1] CRAN (R 4.1.3)
 spatstat.sparse        2.1-1    2022-04-18 [1] CRAN (R 4.1.3)
 spatstat.utils         2.3-0    2021-12-12 [1] CRAN (R 4.1.3)
 statmod                1.4.36   2021-05-10 [1] CRAN (R 4.1.3)
 statnet.common         4.5.0    2021-06-05 [1] CRAN (R 4.1.3)
 stringi                1.7.6    2021-11-29 [1] CRAN (R 4.1.3)
 stringr              * 1.4.0    2019-02-10 [1] CRAN (R 4.1.3)
 SummarizedExperiment   1.24.0   2021-10-26 [1] Bioconductor
 survival               3.3-1    2022-03-03 [1] CRAN (R 4.1.3)
 svglite                2.1.0    2022-02-03 [1] CRAN (R 4.1.3)
 systemfonts            1.0.4    2022-02-11 [1] CRAN (R 4.1.3)
 tensor                 1.5      2012-05-05 [1] CRAN (R 4.1.3)
 tibble               * 3.1.6    2021-11-07 [1] CRAN (R 4.1.3)
 tidyr                * 1.2.0    2022-02-01 [1] CRAN (R 4.1.3)
 tidyselect             1.1.2    2022-02-21 [1] CRAN (R 4.1.3)
 tidyverse            * 1.3.1    2021-04-15 [1] CRAN (R 4.1.3)
 tzdb                   0.3.0    2022-03-28 [1] CRAN (R 4.1.3)
 utf8                   1.2.2    2021-07-24 [1] CRAN (R 4.1.3)
 uwot                   0.1.11   2021-12-02 [1] CRAN (R 4.1.3)
 vctrs                  0.4.1    2022-04-13 [1] CRAN (R 4.1.3)
 viridisLite            0.4.0    2021-04-13 [1] CRAN (R 4.1.3)
 withr                  2.5.0    2022-03-03 [1] CRAN (R 4.1.3)
 xml2                   1.3.3    2021-11-30 [1] CRAN (R 4.1.3)
 xtable                 1.8-4    2019-04-21 [1] CRAN (R 4.1.3)
 XVector                0.34.0   2021-10-26 [1] Bioconductor
 yaml                   2.3.5    2022-02-21 [1] CRAN (R 4.1.3)
 zlibbioc               1.40.0   2021-10-26 [1] Bioconductor
 zoo                    1.8-10   2022-04-15 [1] CRAN (R 4.1.3)

 [1] /home2/bsb0613/miniconda3/envs/CCI/lib/R/library
dbdimitrov commented 2 years ago

Hi @bsb0613,

Would be best to update liana to the latest push - I did a minor edge-case fix for CellChat with the Consensus resource. I doubt it would help with your issue though.

It's likely that it's the version of R. I can check with R4.1 on Monday and I'll let you know if I encounter the issue.

dbdimitrov commented 2 years ago

Again, it also runs on R4.1 for me - really not sure what the issue is in this case.


─ Session info ────────────────────────────────────────────────────────────────────────────────────────────────────
 setting  value
 version  R version 4.1.2 (2021-11-01)
 os       Ubuntu 20.04.4 LTS
 system   x86_64, linux-gnu
 ui       RStudio
 language en_US
 collate  en_US.UTF-8
 ctype    en_US.UTF-8
 tz       Europe/Brussels
 date     2022-04-25
 rstudio  1.4.1717 Juliet Rose (desktop)
 pandoc   NA

─ Packages ────────────────────────────────────────────────────────────────────────────────────────────────────────
 ! package              * version  date (UTC) lib source
   abind                  1.4-5    2016-07-21 [2] CRAN (R 4.1.2)
 P assertthat             0.2.1    2019-03-21 [?] CRAN (R 4.1.2)
   backports              1.4.1    2021-12-13 [2] CRAN (R 4.1.2)
   beachmat               2.10.0   2021-10-26 [2] Bioconductor
   Biobase              * 2.54.0   2021-10-26 [2] Bioconductor
   BiocGenerics         * 0.40.0   2021-10-26 [2] Bioconductor
   BiocNeighbors          1.12.0   2021-10-26 [2] Bioconductor
   BiocParallel           1.28.3   2021-12-09 [2] Bioconductor
   BiocSingular           1.10.0   2021-10-26 [2] Bioconductor
   bitops                 1.0-7    2021-04-24 [2] CRAN (R 4.1.2)
   bluster                1.4.0    2021-10-26 [2] Bioconductor
 P broom                  0.8.0    2022-04-13 [?] CRAN (R 4.1.2)
   CellChat               1.1.3    2022-04-25 [1] Github (sqjin/CellChat@6ff060d)
   cellranger             1.1.0    2016-07-27 [2] CRAN (R 4.1.2)
   checkmate              2.0.0    2020-02-06 [2] CRAN (R 4.1.2)
   circlize               0.4.14   2022-02-11 [1] CRAN (R 4.1.2)
   cli                    3.2.0    2022-02-14 [2] CRAN (R 4.1.2)
   clue                   0.3-60   2021-10-11 [1] CRAN (R 4.1.2)
   cluster                2.1.2    2021-04-17 [2] CRAN (R 4.1.2)
   coda                   0.19-4   2020-09-30 [1] CRAN (R 4.1.2)
   codetools              0.2-18   2020-11-04 [2] CRAN (R 4.1.2)
   colorspace             2.0-2    2021-06-24 [2] CRAN (R 4.1.2)
   ComplexHeatmap         2.10.0   2021-10-26 [1] Bioconductor
   cowplot                1.1.1    2020-12-30 [2] CRAN (R 4.1.2)
   crayon                 1.5.0    2022-02-14 [2] CRAN (R 4.1.2)
   curl                   4.3.2    2021-06-23 [2] CRAN (R 4.1.2)
   data.table             1.14.2   2021-09-27 [2] CRAN (R 4.1.2)
 P DBI                    1.1.2    2021-12-20 [?] CRAN (R 4.1.2)
 P dbplyr                 2.1.1    2021-04-06 [?] CRAN (R 4.1.2)
   DelayedArray           0.20.0   2021-10-26 [2] Bioconductor
   DelayedMatrixStats     1.16.0   2021-10-26 [2] Bioconductor
   deldir                 1.0-6    2021-10-23 [2] CRAN (R 4.1.2)
   digest                 0.6.29   2021-12-01 [2] CRAN (R 4.1.2)
   doParallel             1.0.17   2022-02-07 [1] CRAN (R 4.1.2)
   dplyr                * 1.0.8    2022-02-08 [2] CRAN (R 4.1.2)
   dqrng                  0.3.0    2021-05-01 [2] CRAN (R 4.1.2)
   edgeR                  3.36.0   2021-10-26 [2] Bioconductor
   ellipsis               0.3.2    2021-04-29 [2] CRAN (R 4.1.2)
   fansi                  1.0.2    2022-01-14 [2] CRAN (R 4.1.2)
   fastmap                1.1.0    2021-01-25 [2] CRAN (R 4.1.2)
   fitdistrplus           1.1-6    2021-09-28 [2] CRAN (R 4.1.2)
   FNN                    1.1.3    2019-02-15 [2] CRAN (R 4.1.2)
 P forcats              * 0.5.1    2021-01-27 [?] CRAN (R 4.1.2)
   foreach                1.5.2    2022-02-02 [1] CRAN (R 4.1.2)
   fs                     1.5.2    2021-12-08 [2] CRAN (R 4.1.2)
   future                 1.23.0   2021-10-31 [2] CRAN (R 4.1.2)
   future.apply           1.8.1    2021-08-10 [2] CRAN (R 4.1.2)
   generics               0.1.2    2022-01-31 [2] CRAN (R 4.1.2)
   GenomeInfoDb           1.30.0   2021-10-26 [2] Bioconductor
   GenomeInfoDbData       1.2.7    2022-01-26 [2] Bioconductor
   GenomicRanges          1.46.1   2021-11-18 [2] Bioconductor
   GetoptLong             1.0.5    2020-12-15 [1] CRAN (R 4.1.2)
   ggalluvial             0.12.3   2020-12-05 [1] CRAN (R 4.1.2)
   ggplot2              * 3.3.5    2021-06-25 [2] CRAN (R 4.1.2)
   ggrepel                0.9.1    2021-01-15 [2] CRAN (R 4.1.2)
   ggridges               0.5.3    2021-01-08 [2] CRAN (R 4.1.2)
   GlobalOptions          0.1.2    2020-06-10 [1] CRAN (R 4.1.2)
   globals                0.14.0   2020-11-22 [2] CRAN (R 4.1.2)
   glue                   1.6.1    2022-01-22 [2] CRAN (R 4.1.2)
   goftest                1.2-3    2021-10-07 [2] CRAN (R 4.1.2)
   gridBase               0.4-7    2014-02-24 [1] CRAN (R 4.1.2)
   gridExtra              2.3      2017-09-09 [2] CRAN (R 4.1.2)
   gtable                 0.3.0    2019-03-25 [2] CRAN (R 4.1.2)
 P haven                  2.5.0    2022-04-15 [?] CRAN (R 4.1.2)
   hms                    1.1.1    2021-09-26 [2] CRAN (R 4.1.2)
   htmltools              0.5.2    2021-08-25 [2] CRAN (R 4.1.2)
   htmlwidgets            1.5.4    2021-09-08 [2] CRAN (R 4.1.2)
   httpuv                 1.6.5    2022-01-05 [2] CRAN (R 4.1.2)
   httr                   1.4.2    2020-07-20 [2] CRAN (R 4.1.2)
   ica                    1.0-2    2018-05-24 [2] CRAN (R 4.1.2)
   igraph                 1.2.11   2022-01-04 [2] CRAN (R 4.1.2)
   IRanges                2.28.0   2021-10-26 [2] Bioconductor
   irlba                  2.3.5    2021-12-06 [2] CRAN (R 4.1.2)
   iterators              1.0.14   2022-02-05 [1] CRAN (R 4.1.2)
   jsonlite               1.7.3    2022-01-17 [2] CRAN (R 4.1.2)
   KernSmooth             2.23-20  2021-05-03 [2] CRAN (R 4.1.2)
   later                  1.3.0    2021-08-18 [2] CRAN (R 4.1.2)
   lattice                0.20-45  2021-09-22 [2] CRAN (R 4.1.2)
   lazyeval               0.2.2    2019-03-15 [2] CRAN (R 4.1.2)
   leiden                 0.3.9    2021-07-27 [2] CRAN (R 4.1.2)
   liana                * 0.1.0    2022-04-25 [1] Github (saezlab/liana@7858d41)
   lifecycle              1.0.1    2021-09-24 [2] CRAN (R 4.1.2)
   limma                  3.50.0   2021-10-26 [2] Bioconductor
   listenv                0.8.0    2019-12-05 [2] CRAN (R 4.1.2)
   lmtest                 0.9-39   2021-11-07 [2] CRAN (R 4.1.2)
   locfit                 1.5-9.4  2020-03-25 [2] CRAN (R 4.1.2)
   logger                 0.2.2    2021-10-19 [2] CRAN (R 4.1.2)
 P lubridate              1.8.0    2021-10-07 [?] CRAN (R 4.1.2)
   magrittr               2.0.2    2022-01-26 [2] CRAN (R 4.1.2)
   MASS                   7.3-55   2022-01-13 [2] CRAN (R 4.1.2)
   Matrix                 1.4-0    2021-12-08 [2] CRAN (R 4.1.2)
   MatrixGenerics         1.6.0    2021-10-26 [2] Bioconductor
   matrixStats            0.61.0   2021-09-17 [2] CRAN (R 4.1.2)
   metapod                1.2.0    2021-10-26 [2] Bioconductor
   mgcv                   1.8-38   2021-10-06 [2] CRAN (R 4.1.2)
   mime                   0.12     2021-09-28 [2] CRAN (R 4.1.2)
   miniUI                 0.1.1.1  2018-05-18 [2] CRAN (R 4.1.2)
 P modelr                 0.1.8    2020-05-19 [?] CRAN (R 4.1.2)
   munsell                0.5.0    2018-06-12 [2] CRAN (R 4.1.2)
   network                1.17.1   2021-06-14 [1] CRAN (R 4.1.2)
   nlme                   3.1-155  2022-01-13 [2] CRAN (R 4.1.2)
   NMF                    0.24.0   2022-03-29 [1] CRAN (R 4.1.2)
   OmnipathR              3.3.14   2022-01-26 [2] Github (saezlab/OmnipathR@3eac3ff)
   parallelly             1.30.0   2021-12-17 [2] CRAN (R 4.1.2)
   patchwork              1.1.1    2020-12-17 [2] CRAN (R 4.1.2)
   pbapply                1.5-0    2021-09-16 [2] CRAN (R 4.1.2)
   pillar                 1.7.0    2022-02-01 [2] CRAN (R 4.1.2)
   pkgconfig              2.0.3    2019-09-22 [2] CRAN (R 4.1.2)
   pkgmaker               0.32.2   2020-10-20 [1] CRAN (R 4.1.2)
   plotly                 4.10.0   2021-10-09 [2] CRAN (R 4.1.2)
   plyr                   1.8.6    2020-03-03 [2] CRAN (R 4.1.2)
   png                    0.1-7    2013-12-03 [2] CRAN (R 4.1.2)
   polyclip               1.10-0   2019-03-14 [2] CRAN (R 4.1.2)
   prettyunits            1.1.1    2020-01-24 [2] CRAN (R 4.1.2)
   progress               1.2.2    2019-05-16 [2] CRAN (R 4.1.2)
   promises               1.2.0.1  2021-02-11 [2] CRAN (R 4.1.2)
   purrr                * 0.3.4    2020-04-17 [2] CRAN (R 4.1.2)
   R6                     2.5.1    2021-08-19 [2] CRAN (R 4.1.2)
   RANN                   2.6.1    2019-01-08 [2] CRAN (R 4.1.2)
   rappdirs               0.3.3    2021-01-31 [2] CRAN (R 4.1.2)
   RColorBrewer           1.1-2    2014-12-07 [2] CRAN (R 4.1.2)
   Rcpp                   1.0.8    2022-01-13 [2] CRAN (R 4.1.2)
   RcppAnnoy              0.0.19   2021-07-30 [2] CRAN (R 4.1.2)
   RCurl                  1.98-1.6 2022-02-08 [2] CRAN (R 4.1.2)
   readr                * 2.1.2    2022-01-30 [2] CRAN (R 4.1.2)
   readxl                 1.3.1    2019-03-13 [2] CRAN (R 4.1.2)
   registry               0.5-1    2019-03-05 [1] CRAN (R 4.1.2)
   renv                   0.15.4   2022-03-03 [1] CRAN (R 4.1.2)
 P reprex                 2.0.1    2021-08-05 [?] CRAN (R 4.1.2)
   reshape2               1.4.4    2020-04-09 [2] CRAN (R 4.1.2)
   reticulate             1.24     2022-01-26 [2] CRAN (R 4.1.2)
   rjson                  0.2.21   2022-01-09 [1] CRAN (R 4.1.2)
   rlang                  1.0.1    2022-02-03 [2] CRAN (R 4.1.2)
   rngtools               1.5.2    2021-09-20 [1] CRAN (R 4.1.2)
   ROCR                   1.0-11   2020-05-02 [2] CRAN (R 4.1.2)
   rpart                  4.1.16   2022-01-24 [2] CRAN (R 4.1.2)
   RSpectra               0.16-0   2019-12-01 [2] CRAN (R 4.1.2)
   rstudioapi             0.13     2020-11-12 [2] CRAN (R 4.1.2)
   rsvd                   1.0.5    2021-04-16 [2] CRAN (R 4.1.2)
   Rtsne                  0.15     2018-11-10 [2] CRAN (R 4.1.2)
 P rvest                  1.0.2    2021-10-16 [?] CRAN (R 4.1.2)
   S4Vectors              0.32.3   2021-11-21 [2] Bioconductor
   ScaledMatrix           1.2.0    2021-10-26 [2] Bioconductor
   scales                 1.1.1    2020-05-11 [2] CRAN (R 4.1.2)
   scattermore            0.8      2022-02-14 [2] CRAN (R 4.1.2)
   scran                  1.22.1   2021-11-14 [2] Bioconductor
   sctransform            0.3.3    2022-01-13 [2] CRAN (R 4.1.2)
   scuttle                1.4.0    2021-10-26 [2] Bioconductor
   sessioninfo            1.2.2    2021-12-06 [2] CRAN (R 4.1.2)
   Seurat               * 4.1.0    2022-01-14 [2] CRAN (R 4.1.2)
   SeuratObject         * 4.0.4    2021-11-23 [2] CRAN (R 4.1.2)
   shape                  1.4.6    2021-05-19 [1] CRAN (R 4.1.2)
   shiny                  1.7.1    2021-10-02 [2] CRAN (R 4.1.2)
   SingleCellExperiment   1.16.0   2021-10-26 [2] Bioconductor
   sna                    2.6      2020-10-06 [1] CRAN (R 4.1.2)
   sparseMatrixStats      1.6.0    2021-10-26 [2] Bioconductor
   spatstat.core          2.3-2    2021-11-26 [2] CRAN (R 4.1.2)
   spatstat.data          2.1-2    2021-12-17 [2] CRAN (R 4.1.2)
   spatstat.geom          2.3-2    2022-02-12 [2] CRAN (R 4.1.2)
   spatstat.sparse        2.1-0    2021-12-17 [2] CRAN (R 4.1.2)
   spatstat.utils         2.3-0    2021-12-12 [2] CRAN (R 4.1.2)
   statmod                1.4.36   2021-05-10 [2] CRAN (R 4.1.2)
   statnet.common         4.5.0    2021-06-05 [1] CRAN (R 4.1.2)
   stringi                1.7.6    2021-11-29 [2] CRAN (R 4.1.2)
   stringr              * 1.4.0    2019-02-10 [2] CRAN (R 4.1.2)
   SummarizedExperiment   1.24.0   2021-10-26 [2] Bioconductor
   survival               3.2-13   2021-08-24 [2] CRAN (R 4.1.2)
   svglite                2.1.0    2022-02-03 [1] CRAN (R 4.1.2)
   systemfonts            1.0.4    2022-02-11 [1] CRAN (R 4.1.2)
   tensor                 1.5      2012-05-05 [2] CRAN (R 4.1.2)
   tibble               * 3.1.6    2021-11-07 [2] CRAN (R 4.1.2)
   tidyr                * 1.2.0    2022-02-01 [2] CRAN (R 4.1.2)
   tidyselect             1.1.1    2021-04-30 [2] CRAN (R 4.1.2)
 P tidyverse            * 1.3.1    2021-04-15 [?] CRAN (R 4.1.2)
   tzdb                   0.2.0    2021-10-27 [2] CRAN (R 4.1.2)
   utf8                   1.2.2    2021-07-24 [2] CRAN (R 4.1.2)
   uwot                   0.1.11   2021-12-02 [2] CRAN (R 4.1.2)
   vctrs                  0.3.8    2021-04-29 [2] CRAN (R 4.1.2)
   viridisLite            0.4.0    2021-04-13 [2] CRAN (R 4.1.2)
   withr                  2.4.3    2021-11-30 [2] CRAN (R 4.1.2)
   xml2                   1.3.3    2021-11-30 [2] CRAN (R 4.1.2)
   xtable                 1.8-4    2019-04-21 [2] CRAN (R 4.1.2)
   XVector                0.34.0   2021-10-26 [2] Bioconductor
   yaml                   2.2.2    2022-01-25 [2] CRAN (R 4.1.2)
   zlibbioc               1.40.0   2021-10-26 [2] Bioconductor
   zoo                    1.8-9    2021-03-09 [2] CRAN (R 4.1.2)

 [1] /home/dbdimitrov/Repos/test_cellchat/renv/library/R-4.1/x86_64-conda-linux-gnu
 [2] /home/dbdimitrov/anaconda3/envs/liana4.1/lib/R/library

 P ── Loaded and on-disk path mismatch.```
dbdimitrov commented 2 years ago

Simplified version of your code:

require(liana)
require(tidyverse)
require(Seurat)

testdata <- readRDS("~/Downloads/Seurat_obj_SB.rds")

# sce <- liana_prep(testdata)
# SeuratObject::as.Seurat(sce)

liana_res <- liana_wrap(testdata,
                        method="call_cellchat",
                        idents_col = "celltype",
                        cellchat.params = list(.do_parallel=TRUE))
liana_res
SBaek613 commented 2 years ago

Thanks for trying out with so many different setups.

I have been trying to establish new R 4.0 environment and also trying to update Liana to newer 0.1.0 (6b98c36 to 7858d41) on R4.1 environment.

I had some issues updating Liana due to some conflicts with SingleCellExperiment. With both version 1.12 and 1.16 of SCE, there were errors messages stating some functions are not available from SCE when loading Liana (I forgot to record them but it was something like dim.~ or matrix.~ function).

After several trials and downloading 'renv' package which was the only missing one compared to your R4.1 environment, I am not sure which step fixed it but I was able to download newer Liana 0.1.0.

After running Liana_wrap with the newer version, I got some warning messages like

3: Expected 5 pieces. Missing pieces filled with `NA` in 449 rows [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, ...].

but I was still able to get the results (252 x 6 tibble).

I assume that this is the same result that you got from my subsampled data and hopefully updating Liana fixed all the issues for now.

Again, thank you a lot for helping me out and for a great package.

dbdimitrov commented 2 years ago

Perfect! Good to hear it worked out. I assume the issues are related to incompatible BioConductor packages.

The warning is expected - it's related to formating LIANA resource to CellChat resource format. I will suppress it in LIANA next update.

I will close the issue now - feel free to open any other ones if you encounter any issues.