Run CellChat analysis
Arguments
- srt
A Seurat object.
- group.by
Name of one or more meta.data columns to group (color) cells by.
- species
The species of the data, either
"Homo_sapiens","Mus_musculus", or"zebrafish".- split.by
Name of a column in meta.data column to split plot by. Default is
NULL.- annotation_selected
A vector of cell annotations of interest for running the
CellChatanalysis. If not provided, all cell types will be considered.- group_column
Name of the metadata column in the
Seuratobject that defines conditions or groups.- group_cmp
A list of pairwise condition comparisons for differential
CellChatanalysis.- thresh
The threshold for computing centrality scores. Default is
0.05.- min.cells
the minmum number of expressed cells required for the genes that are considered for cell-cell communication analysis. Default is
10.- do.fast
Whether to use CellChat's fast Wilcoxon implementation backed by
presto. Set toTRUEonly whenprestois installed.- backend
Backend used for scop post-processing and unified CCC table aggregation. Upstream CellChat inference is unchanged.
- assay
Which assay to use. If
NULL, the default assay of theSeuratobject will be used.- layer
The layer to use for the expression data. Default is
"data".- verbose
Whether to print the message. Default is
TRUE.
Examples
data(pancreas_sub)
pancreas_sub <- standard_scop(pancreas_sub)
#> ℹ [2026-07-02 09:26:31] Start standard processing workflow...
#> ℹ [2026-07-02 09:26:32] Checking a list of <Seurat>...
#> ! [2026-07-02 09:26:32] Data 1/1 of the `srt_list` is "unknown"
#> ℹ [2026-07-02 09:26:32] Perform `NormalizeData()` with `normalization.method = 'LogNormalize'` on 1/1 of `srt_list`...
#> ℹ [2026-07-02 09:26:32] Perform `FindVariableFeatures()` on 1/1 of `srt_list`...
#> ℹ [2026-07-02 09:26:32] Use the separate HVF from `srt_list`
#> ℹ [2026-07-02 09:26:32] Number of available HVF: 2000
#> ℹ [2026-07-02 09:26:32] Finished check
#> ℹ [2026-07-02 09:26:32] Perform `ScaleData()`
#> ℹ [2026-07-02 09:26:32] Perform pca linear dimension reduction
#> ℹ [2026-07-02 09:26:33] Use stored estimated dimensions 1:23 for Standardpca
#> ℹ [2026-07-02 09:26:33] Perform `Seurat::FindClusters()` with `cluster_algorithm = 'louvain'` and `cluster_resolution = 0.6`
#> ℹ [2026-07-02 09:26:33] Reorder clusters...
#> ℹ [2026-07-02 09:26:33] Skip `log1p()` because `layer = data` is not "counts"
#> ℹ [2026-07-02 09:26:33] Perform umap nonlinear dimension reduction
#> ✔ [2026-07-02 09:26:40] Standard processing workflow completed
pancreas_sub <- RunCellChat(
pancreas_sub,
group.by = "CellType",
species = "Mus_musculus"
)
#> ℹ [2026-07-02 09:26:40] Start CellChat analysis
#> Error in loadNamespace(name): there is no package called ‘CellChat’
CCCNetworkPlot(
pancreas_sub,
method = "CellChat",
plot_type = "bipartite"
)
#> Error in get_dataset_object(srt, condition = condition, dataset = dataset): Unable to determine which CellChat object to plot. Please specify
#> `condition`
CCCHeatmap(
pancreas_sub,
method = "CellChat",
plot_type = "heatmap"
)
#> Error in get_dataset_object(srt, condition = condition, dataset = dataset): Unable to determine which CellChat object to plot. Please specify
#> `condition`
CCCStatPlot(
pancreas_sub,
method = "CellChat",
plot_type = "violin",
top_n = 50
)
#> Error in get_dataset_object(srt, condition = condition, dataset = dataset): Unable to determine which CellChat object to plot. Please specify
#> `condition`