Learn R Programming

CellChat: Inference and analysis of cell-cell communication

Important update!!

February 17, 2021 (Version 1.0.0)

  • CellChat paper is now officially published (Jin et al., Nature Communications, 2021). Compared to the preprint, we have now experimentally validated CellChat's predictions on embryonic skin using RNAscope technique, applied CellChat to a human diseased skin dataset and updated many others.
  • We have now developed a standalone CellChat Shiny App for interactive exploration of the cell-cell communication analyzed by CellChat. Want to share your results with your collaborators like biologists for further exploration? Try it out!

January 05, 2021 (Version 0.5.0)

  • Slight changes of CellChat object (Please update your previously calculated CellChat object via updateCellChat())
  • Enhanced documentation of functions and tutorials (use help() to check the documentation, e.g., help(CellChat))
  • New features for comparison analysis of multiple datasets
  • Support for creating a new CellChat object from Seurat V3 or SingleCellExperiment object

Web-based “CellChat Explorer”

We build a user-friendly web-based “CellChat Explorer” that contains two major components:

  • Ligand-Receptor Interaction Explorer that allows easy exploration of our novel ligand-receptor interaction database, a comprehensive recapitulation of known molecular compositions including multimeric complexes and co-factors. Our database CellChatDB is a manually curated database of literature-supported ligand-receptor interactions in both human and mouse.
  • Cell-Cell Communication Atlas Explorer that allows easy exploration of the cell-cell communication for any given scRNA-seq dataset that has been processed by our R toolkit CellChat.

We have now also developed a standalone CellChat Shiny App for our Cell-Cell Communication Atlas Explorer.

Capabilities

In addition to infer the intercellular communication from any given scRNA-seq data, CellChat provides functionality for further data exploration, analysis, and visualization.

  • It is able to analyze cell-cell communication for continuous states along cellular development trajectories.
  • It can quantitatively characterize and compare the inferred cell-cell communication networks using an integrated approach by combining social network analysis, pattern recognition, and manifold learning approaches.
  • It provides an easy-to-use tool for extracting and visualizing high-order information of the inferred networks. For example, it allows ready prediction of major signaling inputs and outputs for all cell populations and how these populations and signals coordinate together for functions.
  • It provides several visualization outputs to facilitate intuitive user-guided data interpretation.

Check out our paper (Jin et al., Nature Communications, 2021) for the detailed methods and applications.

Installation

CellChat R package can be easily installed from Github using devtools:

devtools::install_github("sqjin/CellChat")

Please make sure you have installed the correct version of NMF and circlize package. See instruction below.

Installation of other dependencies

  • Install NMF (>= 0.23.0) using install.packages('NMF'). Please check here for other solutions if you encounter any issue. You might can set Sys.setenv(R_REMOTES_NO_ERRORS_FROM_WARNINGS=TRUE) if it throws R version error.
  • Install circlize (>= 0.4.12) using devtools::install_github("jokergoo/circlize") if you encounter any issue.
  • Install ComplexHeatmap using devtools::install_github("jokergoo/ComplexHeatmap") if you encounter any issue.
  • Install UMAP python pacakge for dimension reduction: pip install umap-learn. Please check here if you encounter any issue.

Some users might have issues when installing CellChat pacakge due to different operating systems and new R version. Please check the following solutions:

  • Installation on Mac OX with R > 3.6: Please re-install Xquartz.
  • Installation on Windows, Linux and Centos: Please check the solution for Windows and Linux.

Tutorials

Please check the tutorial directory of the repo.

System Requirements

  • Hardware requirements: CellChat package requires only a standard computer with enough RAM to support the in-memory operations.

  • Software requirements: This package is supported for macOS, Windows and Linux. The package has been tested on macOS: Mojave (10.14.5) and Windows 10. Dependencies of CellChat package are indicated in the Description file, and can be automatically installed when installing CellChat pacakge. CellChat can be installed on a normal computer within few mins.

Help or Suggestion

If you have any question, comment or suggestion, please post it in the 'Issues' section or contact cellchat.package@gmail.com.

How to cite?

Suoqin Jin, Christian F. Guerrero-Juarez, Lihua Zhang, Ivan Chang, Raul Ramos, Chen-Hsiang Kuan, Peggy Myung, Maksim V. Plikus, Qing Nie. Inference and analysis of cell-cell communication using CellChat. Nature Communications, 12:1088 (2021). https://www.nature.com/articles/s41467-021-21246-9

Copy Link

Version

Version

1.0.0

License

GPL-3

Maintainer

Suoqin Jin

Last Published

August 17th, 2021

Functions in CellChat (1.0.0)

AnyMatrix-class

The CellChat Class
CellChatDB.mouse

Ligand-receptor interactions in CellChat database for mouse
CellChatDB.human

Ligand-receptor interactions in CellChat database for human
CellChat-class

The key slots used in the CellChat object are described below.
addMeta

Add the cell information into meta slot
aggregateNet

Calculate the aggregated network by counting the number of links or summarizing the communication probability
CellChat_theme_opts

ggplot theme in CellChat
PPI.human

Human Protein-Protein interactions
PPI.mouse

Mouse Protein-Protein interactions
compareInteractions

Comparing the number of inferred communication links between different datasets
dotPlot

Dot plot
computeExpr_agonist

Modeling the effect of agonist on the ligand-receptor interaction
liftCellChat

Update a CellChat object by lifting up the cell groups to the same cell labels across all datasets
extractEnrichedLR_internal

Identify all the significant interactions (L-R pairs) and related signaling genes for a given signaling pathway
extractEnrichedLR

Identify all the significant interactions (L-R pairs) and related signaling genes for a given signaling pathway
computeEigengap

Compute the eigengap of a given matrix for inferring the number of clusters
l1NormalizeRows

Row-normalize a sparse, symmetric matrix (using the l1 norm) so that each row sums to 1.
StackedVlnPlot

Stacked Violin plot
netMappingDEG

Mapping the differential expressed genes (DEG) information onto the inferred cell-cell communications
alpha_centrality

compute alpha centrality
computeCentralityLocal

Compute Centrality measures for a signaling network
checkGeneSymbol

check the official Gene Symbol
computeCommunProbPathway

Compute the communication probability on signaling pathway level by summarizing all related ligands/receptors
computeCommunProb

Compute the communication probability/strength between any interacting cell groups
computeExpr_antagonist

Modeling the effect of antagonist on the ligand-receptor interaction
colorRamp3

Color interpolation
computeLaplacian

Compute eigenvalues of associated Laplacian matrix of a given matrix
computeExpr_coreceptor

Modeling the effect of coreceptor on the ligand-receptor interaction
buildSNN

Build SNN matrix
extractGeneSubset

Extract the gene name
computeNetSimilarityPairwise

Compute signaling network similarity for any pair of datasets
extractGene

Extract the genes involved in CellChatDB
createCellChat

Create a new CellChat object from a data matrix, Seurat or SingleCellExperiment object
netVisual_hierarchy1

Hierarchy plot of cell-cell communications sending to cell groups in vertex.receiver
netVisual

Visualize the inferred cell-cell communication network
netVisual_hierarchy2

Hierarchy plot of cell-cell communication sending to cell groups not in vertex.receiver
netAnalysis_signalingRole

Identification of dominant senders, receivers, mediators and influencers in the intercellular communication network
computeNetD_structure

Compute the structural distance between two signaling networks
identifyCommunicationPatterns

Identification of major signals for specific cell groups and general communication patterns
identifyEnrichedInteractions

Identify all the significant interactions (L-R pairs) from some cell groups to other cell groups
netAnalysis_signalingRole_heatmap

Heatmap showing the contribution of signals (signaling pathways or ligand-receptor pairs) to cell groups in terms of outgoing or incoming signaling
getMaxWeight

Compute the maximum value of certain measures in the inferred cell-cell communication networks
entropia

compute the Shannon entropy
computeExpr_complex

Compute the expression of complex using geometric mean
identifyOverExpressedGenes

Identify over-expressed signaling genes associated with each cell group
filterCommunication

Filter cell-cell communication if there are only few number of cells in certain cell groups
computeNetSimilarity

Compute signaling network similarity for any pair of signaling networks
geometricMean

Compute the geometric mean
netVisual_embeddingZoomIn

Zoom into the 2D visualization of the learned manifold learning of the signaling networks
randomWalkBySolve

project data on graph by solving the linear equation (I - alpha*A) * E_sm = E * (1-alpha)
netVisual_heatmap

Visualization of network using heatmap
rankNet

Rank signaling networks based on the information flow
netAnalysis_dot

Dot plots showing the associations of latent patterns with cell groups and ligand-receptor pairs or signaling pathways
extractGeneSubsetFromPair

Extract the signaling gene names from ligand-receptor pairs
extract_max

extract the max value of the y axis
ggPalette

Generate ggplot2 colors
projectFromNetworkRecombine

Combine gene expression from projected space (that of the network) with the expression of genes that were not projected (not present in network)
show,CellChat-method

show method for CellChat
netAnalysis_river

River plot showing the associations of latent patterns with cell groups and ligand-receptor pairs or signaling pathways
identifyOverExpressedLigandReceptor

Identify over-expressed ligands and (complex) receptors associated with each cell group
identifyOverExpressedInteractions

Identify over-expressed ligand-receptor interactions (pairs) within the used CellChatDB
l1NormalizeColumns

Column-normalize a sparse, symmetric matrix (using the l1 norm) so that each column sums to 1.
mergeCellChat

Merge CellChat objects
modify_vlnplot

modified vlnplot
mycircle

generate circle symbol
netVisual_chord_cell

Chord diagram for visualizing cell-cell communication for a signaling pathway
netVisual_individual

Visualize the inferred signaling network of individual L-R pairs
netVisual_chord_cell_internal

Chord diagram for visualizing cell-cell communication from a weighted adjacency matrix or a data frame
projectOnNetwork

Project the gene expression matrix onto a lower space of the genes defined in the projecting network
netVisual_bubble

Show all the significant interactions (L-R pairs) from some cell groups to other cell groups
netVisual_diffInteraction

Circle plot showing differential cell-cell communication network between two datasets
netVisual_aggregate

Visualize the inferred signaling network of signaling pathways by aggregating all L-R pairs
showDatabaseCategory

Show the description of CellChatDB databse
netAnalysis_computeCentrality

Compute the network centrality scores allowing identification of dominant senders, receivers, mediators and influencers in all inferred communication networks
scaleMat

Scale a data matrix
searchPair

Subset the ligand-receptor interactions for given specific signals in CellChatDB
subsetData

Subset the expression data of signaling genes for saving computation cost
nnd

compute nnd
netClustering

Classification learning of the signaling networks
netEmbedding

Manifold learning of the signaling networks based on their similarity
netAnalysis_contribution

Compute and visualize the contribution of each ligand-receptor pair in the overall signaling pathways
netVisual_embeddingPairwise

2D visualization of the joint manifold learning of signaling networks from two datasets
runUMAP

Run UMAP
runPCA

Dimension reduction using PCA
pieChart

Plot pie chart
netVisual_embedding

2D visualization of the learned manifold of signaling networks
mergeInteractions

Compute the number of interactions/interaction strength between cell types based on their associated cell subpopulations
netAnalysis_signalingRole_network

Heatmap showing the centrality scores/importance of cell groups as senders, receivers, mediators and influencers in a single intercellular communication network
thresholdedMean

Compute the average expression per cell group when the percent of expressing cells per cell group larger than a threshold
rankNetPairwise

Rank ligand-receptor interactions for any pair of two cell groups
plotGeneExpression

A Seurat wrapper function for plotting gene expression using violin plot or dot plot
rankSimilarity

Rank the similarity of the shared signaling pathways based on their joint manifold learning
netVisual_embeddingPairwiseZoomIn

Zoom into the 2D visualization of the joint manifold learning of signaling networks from two datasets
netAnalysis_signalingRole_scatter

2D visualization of dominant senders (sources) and receivers (targets)
netVisual_circle

Circle plot of cell-cell communication network
normalizeData

Normalize data using a scaling factor
netVisual_chord_gene

Chord diagram for visualizing cell-cell communication for a set of ligands/receptors or signaling pathways
node_distance

compute the node distance matrix
projectAndRecombine

Perform network projecting on network when the network genes and the experiment genes aren't exactly the same.
updateCellChat

Update a single CellChat object
triMean

Compute the Tukey's trimean
selectK

Select the number of the patterns for running `identifyCommunicationPatterns`
setIdent

Set the default identity of cells
projectData

Project gene expression data onto a protein-protein interaction network
scPalette

Generate colors from a customed color palette
subsetCommunication_internal

Subset the inferred cell-cell communications of interest
subsetDB

Subset CellChatDB databse by only including interactions of interest
subsetCommunication

Subset the inferred cell-cell communications of interest
sketchData

Downsampling single cell data
scaleData

Scale the data