问题出在这里:
cellchat <- netClustering(cellchat, type = "functional")
修改为cellchat <- netClustering(cellchat, type = "functional", do.parallel = FALSE)
就ok了
——————分割线——————
library(future)
plan("multisession", workers = 4) # 或者设置您想要的核心数
cellchat <- computeNetSimilarity(cellchat, type = "functional")
cellchat <- netEmbedding(cellchat, type = "functional")
#> Manifold learning of the signaling networks for a single dataset
cellchat <- netClustering(cellchat, type = "functional")
#> Classification learning of the signaling networks for a single dataset
# Visualization in 2D-space
netVisual_embedding(cellchat, type = "functional", label.size = 3.5)
Manifold learning of the signaling networks for a single dataset Classification learning of the signaling networks for a single dataset