# NOT RUN {
# Input is a data matrix
## create a dataframe consisting of the cell labels
meta = data.frame(labels = cell.labels, row.names = names(cell.labels))
cellchat <- createCellChat(object = data.input, meta = meta, group.by = "labels")
# input is a Seurat object
## use the default cell identities of Seurat object
# cellchat <- createCellChat(object = seurat.obj, group.by = "ident")
## use other meta information as cell groups
# cellchat <- createCellChat(object = seurat.obj, group.by = "seurat.clusters")
# input is a SingleCellExperiment object
# cellchat <- createCellChat(object = sce.obj, group.by = "sce.clusters")
# }
Run the code above in your browser using DataLab