Skip to content
This repository has been archived by the owner on Jan 24, 2024. It is now read-only.

CellChat2 computeCommunProb error #727

Open
kcavagnero opened this issue Nov 21, 2023 · 1 comment
Open

CellChat2 computeCommunProb error #727

kcavagnero opened this issue Nov 21, 2023 · 1 comment

Comments

@kcavagnero
Copy link

Hi Sqjin,

Thank you for the great package. v1 has been such a great resource for the single cell community. Looking forward to using v2 with the larger L-R database but I am having some issues getting started.

When running computeCommunProb() I get the below error
in if (object@options$data type != "rna") {: argument is of length zero

I suspect this is because
dim([email protected])
0,0

Previously with same data using v1 did not have this issue and
dim([email protected])
744,14891

For both versions I created my cellchat objects from seurat using the code below.

library(Seurat)
library(CellChat)
data.input <- GetAssayData(healthy, assay = "RNA", slot = "data") # normalized data matrix
Idents(healthy) <- "celltype"
labels <- Idents(healthy)
meta <- data.frame(group = labels, row.names = names(labels))
cellchat <- createCellChat(object = data.input, meta = meta, group.by = "group")

Any idea how to fix?

sessionInfo()
R version 4.1.3 (2022-03-10)
Platform: x86_64-conda-linux-gnu (64-bit)
Running under: CentOS Linux 7 (Core)

Matrix products: default
BLAS/LAPACK: /home/kecavagn/miniconda3/envs/seurat_cellchat2/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] stats graphics grDevices utils datasets methods base

other attached packages:
[1] patchwork_1.1.3 CellChat_2.0.0 Biobase_2.54.0
[4] BiocGenerics_0.40.0 ggplot2_3.4.4 igraph_1.5.1
[7] dplyr_1.1.4 sp_1.4-7 SeuratObject_4.1.0
[10] Seurat_4.1.1

loaded via a namespace (and not attached):
[1] backports_1.4.1 circlize_0.4.15 uuid_1.1-1
[4] systemfonts_1.0.5 NMF_0.26 plyr_1.8.9
[7] repr_1.1.4 lazyeval_0.2.2 splines_4.1.3
[10] BiocParallel_1.28.3 listenv_0.9.0 scattermore_0.8
[13] ggnetwork_0.5.12 gridBase_0.4-7 digest_0.6.33
[16] foreach_1.5.2 htmltools_0.5.7 ggalluvial_0.12.5
[19] fansi_1.0.5 magrittr_2.0.3 tensor_1.5
[22] cluster_2.1.3 doParallel_1.0.17 ROCR_1.0-11
[25] sna_2.7-1 ComplexHeatmap_2.15.4 globals_0.16.2
[28] matrixStats_1.1.0 svglite_2.1.2 spatstat.sparse_2.1-1
[31] colorspace_2.1-0 ggrepel_0.9.4 crayon_1.5.2
[34] jsonlite_1.8.7 progressr_0.10.0 spatstat.data_2.2-0
[37] survival_3.3-1 zoo_1.8-10 iterators_1.0.14
[40] glue_1.6.2 polyclip_1.10-0 registry_0.5-1
[43] gtable_0.3.4 leiden_0.4.2 GetoptLong_1.0.5
[46] car_3.1-2 shape_1.4.6 future.apply_1.11.0
[49] abind_1.4-5 scales_1.2.1 rngtools_1.5.2
[52] rstatix_0.7.2 spatstat.random_2.2-0 miniUI_0.1.1.1
[55] Rcpp_1.0.11 viridisLite_0.4.2 xtable_1.8-4
[58] clue_0.3-65 reticulate_1.34.0 spatstat.core_2.4-2
[61] stats4_4.1.3 htmlwidgets_1.6.2 httr_1.4.7
[64] FNN_1.1.3.2 RColorBrewer_1.1-3 ellipsis_0.3.2
[67] ica_1.0-2 farver_2.1.1 pkgconfig_2.0.3
[70] sass_0.4.7 uwot_0.1.11 deldir_1.0-6
[73] utf8_1.2.4 labeling_0.4.3 tidyselect_1.2.0
[76] rlang_1.1.2 reshape2_1.4.4 later_1.3.1
[79] munsell_0.5.0 tools_4.1.3 cachem_1.0.8
[82] cli_3.6.1 generics_0.1.3 statnet.common_4.9.0
[85] broom_1.0.5 ggridges_0.5.3 evaluate_0.23
[88] stringr_1.5.1 fastmap_1.1.1 goftest_1.2-3
[91] fitdistrplus_1.1-8 purrr_1.0.2 RANN_2.6.1
[94] pbapply_1.7-2 future_1.33.0 nlme_3.1-157
[97] mime_0.12 compiler_4.1.3 plotly_4.10.3
[100] png_0.1-8 ggsignif_0.6.4 spatstat.utils_2.3-1
[103] tibble_3.2.1 bslib_0.5.1 stringi_1.8.1
[106] RSpectra_0.16-1 rgeos_0.5-9 lattice_0.20-45
[109] IRdisplay_1.1 Matrix_1.6-3 vctrs_0.6.4
[112] pillar_1.9.0 lifecycle_1.0.4 BiocManager_1.30.22
[115] GlobalOptions_0.1.2 spatstat.geom_2.4-0 lmtest_0.9-40
[118] jquerylib_0.1.4 RcppAnnoy_0.0.19 BiocNeighbors_1.12.0
[121] data.table_1.14.8 cowplot_1.1.1 irlba_2.3.5.1
[124] httpuv_1.6.12 R6_2.5.1 network_1.18.1
[127] promises_1.2.1 KernSmooth_2.23-20 gridExtra_2.3
[130] IRanges_2.28.0 parallelly_1.36.0 codetools_0.2-18
[133] MASS_7.3-57 rjson_0.2.21 withr_2.5.2
[136] presto_1.0.0 sctransform_0.3.3 S4Vectors_0.32.4
[139] mgcv_1.8-40 parallel_4.1.3 grid_4.1.3
[142] rpart_4.1.16 tidyverse_2.0.0 IRkernel_1.3
[145] coda_0.19-4 tidyr_1.3.0 carData_3.0-5
[148] Cairo_1.5-15 Rtsne_0.16 ggpubr_0.6.0
[151] pbdZMQ_0.3-7 shiny_1.8.0 base64enc_0.1-3

@kcavagnero
Copy link
Author

Update: this issue resolves when switching from
CellChatDB.use <- CellChatDB # simply use the default CellChatDB
to
CellChatDB.use <- subsetDB(CellChatDB, search = "Secreted Signaling", key = "annotation") # use Secreted Signaling

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant