使用cellchat进行细胞间通讯分析

安装R包

devtools::install_github("sqjin/CellChat")

如果安装不成功,可能是
1.You might need to manually intall the dependencies ComplexHeatmap using devtools::install_github("jokergoo/ComplexHeatmap") if it is not automatically installed.
2.你等网速好的时候再试试。

加载需要的R包

library(CellChat)
library(ggplot2)
library(ggalluvial)
library(svglite)
library(Seurat)
library(SeuratData)
options(stringsAsFactors = FALSE)

使用内置外周血数据集测试

pbmc3k.final
## An object of class Seurat 
## 13714 features across 2638 samples within 1 assay 
## Active assay: RNA (13714 features, 2000 variable features)
##  2 dimensional reductions calculated: pca, umap
pbmc3k.final@commands$FindClusters  # 你也看一看作者的其他命令,Seurat是记录其分析过程的。
## Command: FindClusters(pbmc3k.final, resolution = 0.5)
## Time: 2019-07-14 02:42:30
## graph.name : RNA_snn 
## modularity.fxn : 1 
## resolution : 0.5 
## algorithm : 1 
## n.start : 10 
## n.iter : 10 
## random.seed : 0 
## verbose : TRUE
pbmc3k.final@assays$RNA@data[1:4,1:4]
## 4 x 4 sparse Matrix of class "dgCMatrix"
##               AAACATACAACCAC AAACATTGAGCTAC AAACATTGATCAGC AAACCGTGCTTCCG
## AL627309.1                 .              .              .              .
## AP006222.2                 .              .              .              .
## RP11-206L10.2              .              .              .              .
## RP11-206L10.9              .              .              .              .
dim(pbmc3k.final$seurat_annotations)
## NULL
str(pbmc3k.final$seurat_annotations)
##  Factor w/ 9 levels "Naive CD4 T",..: 2 4 2 3 7 2 5 5 1 6 ...
##  - attr(*, "names")= chr [1:2638] "AAACATACAACCAC" "AAACATTGAGCTAC" "AAACATTGATCAGC" "AAACCGTGCTTCCG" ...
table(pbmc3k.final$seurat_annotations)
## 
##  Naive CD4 T Memory CD4 T   CD14+ Mono            B        CD8 T FCGR3A+ Mono 
##          697          483          480          344          271          162 
##           NK           DC     Platelet 
##          155           32           14

准备输入文件

data.input  <- pbmc3k.final@assays$RNA@data
data.input[1:4,1:4]
## 4 x 4 sparse Matrix of class "dgCMatrix"
##               AAACATACAACCAC AAACATTGAGCTAC AAACATTGATCAGC AAACCGTGCTTCCG
## AL627309.1                 .              .              .              .
## AP006222.2                 .              .              .              .
## RP11-206L10.2              .              .              .              .
## RP11-206L10.9              .              .              .              .
identity = data.frame(group =pbmc3k.final$seurat_annotations, row.names = names(pbmc3k.final$seurat_annotations)) # create a dataframe consisting of the cell labels
head(identity)
##                       group
## AAACATACAACCAC Memory CD4 T
## AAACATTGAGCTAC            B
## AAACATTGATCAGC Memory CD4 T
## AAACCGTGCTTCCG   CD14+ Mono
## AAACCGTGTATGCG           NK
## AAACGCACTGGTAC Memory CD4 T
unique(identity$group) # check the cell labels
## [1] Memory CD4 T B            CD14+ Mono   NK           CD8 T       
## [6] Naive CD4 T  FCGR3A+ Mono DC           Platelet    
## 9 Levels: Naive CD4 T Memory CD4 T CD14+ Mono B CD8 T FCGR3A+ Mono NK ... Platelet
table(identity$group)
## 
##  Naive CD4 T Memory CD4 T   CD14+ Mono            B        CD8 T FCGR3A+ Mono 
##          697          483          480          344          271          162 
##           NK           DC     Platelet 
##          155           32           14

创建一个Cell Chat对象。

cellchat <- createCellChat(data = data.input)
cellchat
## An object of class CellChat 
##  13714 genes.
##  2638 cells.
summary(cellchat)
##   Length    Class     Mode 
##        1 CellChat       S4
#思维导图可视化数据结构
install.packages('mindr')
library(mindr)
out <- capture.output(str(cellchat))
out
##  [1] "Formal class 'CellChat' [package \"CellChat\"] with 14 slots"                                                 
##  [2] "  ..@ data.raw      : num[0 , 0 ] "                                                                           
##  [3] "  ..@ data          :Formal class 'dgCMatrix' [package \"Matrix\"] with 6 slots"                              
##  [4] "  .. .. ..@ i       : int [1:2238732] 29 73 80 148 163 184 186 227 229 230 ..."                               
##  [5] "  .. .. ..@ p       : int [1:2639] 0 779 2131 3260 4220 4741 5522 6304 7094 7626 ..."                         
##  [6] "  .. .. ..@ Dim     : int [1:2] 13714 2638"                                                                   
##  [7] "  .. .. ..@ Dimnames:List of 2"                                                                               
##  [8] "  .. .. .. ..$ : chr [1:13714] \"AL627309.1\" \"AP006222.2\" \"RP11-206L10.2\" \"RP11-206L10.9\" ..."         
##  [9] "  .. .. .. ..$ : chr [1:2638] \"AAACATACAACCAC\" \"AAACATTGAGCTAC\" \"AAACATTGATCAGC\" \"AAACCGTGCTTCCG\" ..."
## [10] "  .. .. ..@ x       : num [1:2238732] 1.64 1.64 2.23 1.64 1.64 ..."                                           
## [11] "  .. .. ..@ factors : list()"                                                                                 
## [12] "  ..@ data.signaling: num[0 , 0 ] "                                                                           
## [13] "  ..@ data.scale    : num[0 , 0 ] "                                                                           
## [14] "  ..@ data.project  : num[0 , 0 ] "                                                                           
## [15] "  ..@ net           : list()"                                                                                 
## [16] "  ..@ netP          : list()"                                                                                 
## [17] "  ..@ meta          :'data.frame':\t0 obs. of  0 variables"                                                   
## [18] "Formal class 'data.frame' [package \"methods\"] with 4 slots"                                                 
## [19] "  .. .. ..@ .Data    : list()"                                                                                
## [20] "  .. .. ..@ names    : chr(0) "                                                                               
## [21] "  .. .. ..@ row.names: int(0) "                                                                               
## [22] "  .. .. ..@ .S3Class : chr \"data.frame\""                                                                    
## [23] "  ..@ idents        :Formal class 'factor' [package \"methods\"] with 3 slots"                                
## [24] "  .. .. ..@ .Data   : int(0) "                                                                                
## [25] "  .. .. ..@ levels  : chr(0) "                                                                                
## [26] "  .. .. ..@ .S3Class: chr \"factor\""                                                                         
## [27] "  ..@ DB            : list()"                                                                                 
## [28] "  ..@ LR            : list()"                                                                                 
## [29] "  ..@ var.features  : logi(0) "                                                                               
## [30] "  ..@ dr            : list()"                                                                                 
## [31] "  ..@ options       : list()"
out2 <- paste(out, collapse="\n")
out2
mm(gsub("\\.\\.@","# ",gsub("\\.\\. ","#",out2)),type ="text")
str也可以查看数据结构
str(cellchat)
## Formal class 'CellChat' [package "CellChat"] with 14 slots
##   ..@ data.raw      : num[0 , 0 ] 
##   ..@ data          :Formal class 'dgCMatrix' [package "Matrix"] with 6 slots
##   .. .. ..@ i       : int [1:2238732] 29 73 80 148 163 184 186 227 229 230 ...
##   .. .. ..@ p       : int [1:2639] 0 779 2131 3260 4220 4741 5522 6304 7094 7626 ...
##   .. .. ..@ Dim     : int [1:2] 13714 2638
##   .. .. ..@ Dimnames:List of 2
##   .. .. .. ..$ : chr [1:13714] "AL627309.1" "AP006222.2" "RP11-206L10.2" "RP11-206L10.9" ...
##   .. .. .. ..$ : chr [1:2638] "AAACATACAACCAC" "AAACATTGAGCTAC" "AAACATTGATCAGC" "AAACCGTGCTTCCG" ...
##   .. .. ..@ x       : num [1:2238732] 1.64 1.64 2.23 1.64 1.64 ...
##   .. .. ..@ factors : list()
##   ..@ data.signaling: num[0 , 0 ] 
##   ..@ data.scale    : num[0 , 0 ] 
##   ..@ data.project  : num[0 , 0 ] 
##   ..@ net           : list()
##   ..@ netP          : list()
##   ..@ meta          :'data.frame':   0 obs. of  0 variables
## Formal class 'data.frame' [package "methods"] with 4 slots
##   .. .. ..@ .Data    : list()
##   .. .. ..@ names    : chr(0) 
##   .. .. ..@ row.names: int(0) 
##   .. .. ..@ .S3Class : chr "data.frame"
##   ..@ idents        :Formal class 'factor' [package "methods"] with 3 slots
##   .. .. ..@ .Data   : int(0) 
##   .. .. ..@ levels  : chr(0) 
##   .. .. ..@ .S3Class: chr "factor"
##   ..@ DB            : list()
##   ..@ LR            : list()
##   ..@ var.features  : logi(0) 
##   ..@ dr            : list()
##   ..@ options       : list()

把metadata信息加到CellChat对象中,这个写法跟Seurat很像

cellchat <- addMeta(cellchat, meta = identity, meta.name = "labels")
head(cellchat@meta)
##                      labels
## AAACATACAACCAC Memory CD4 T
## AAACATTGAGCTAC            B
## AAACATTGATCAGC Memory CD4 T
## AAACCGTGCTTCCG   CD14+ Mono
## AAACCGTGTATGCG           NK
## AAACGCACTGGTAC Memory CD4 T
str(cellchat)
## Formal class 'CellChat' [package "CellChat"] with 14 slots
##   ..@ data.raw      : num[0 , 0 ] 
##   ..@ data          :Formal class 'dgCMatrix' [package "Matrix"] with 6 slots
##   .. .. ..@ i       : int [1:2238732] 29 73 80 148 163 184 186 227 229 230 ...
##   .. .. ..@ p       : int [1:2639] 0 779 2131 3260 4220 4741 5522 6304 7094 7626 ...
##   .. .. ..@ Dim     : int [1:2] 13714 2638
##   .. .. ..@ Dimnames:List of 2
##   .. .. .. ..$ : chr [1:13714] "AL627309.1" "AP006222.2" "RP11-206L10.2" "RP11-206L10.9" ...
##   .. .. .. ..$ : chr [1:2638] "AAACATACAACCAC" "AAACATTGAGCTAC" "AAACATTGATCAGC" "AAACCGTGCTTCCG" ...
##   .. .. ..@ x       : num [1:2238732] 1.64 1.64 2.23 1.64 1.64 ...
##   .. .. ..@ factors : list()
##   ..@ data.signaling: num[0 , 0 ] 
##   ..@ data.scale    : num[0 , 0 ] 
##   ..@ data.project  : num[0 , 0 ] 
##   ..@ net           : list()
##   ..@ netP          : list()
##   ..@ meta          :'data.frame':   2638 obs. of  1 variable:
##   .. ..$ labels: Factor w/ 9 levels "Naive CD4 T",..: 2 4 2 3 7 2 5 5 1 6 ...
##   ..@ idents        :Formal class 'factor' [package "methods"] with 3 slots
##   .. .. ..@ .Data   : int(0) 
##   .. .. ..@ levels  : chr(0) 
##   .. .. ..@ .S3Class: chr "factor"
##   ..@ DB            : list()
##   ..@ LR            : list()
##   ..@ var.features  : logi(0) 
##   ..@ dr            : list()
##   ..@ options       : list()
cellchat <- setIdent(cellchat, ident.use = "labels") # set "labels" as default cell identity
levels(cellchat@idents) # show factor levels of the cell labels
## [1] "Naive CD4 T"  "Memory CD4 T" "CD14+ Mono"   "B"            "CD8 T"       
## [6] "FCGR3A+ Mono" "NK"           "DC"           "Platelet"
groupSize <- as.numeric(table(cellchat@idents)) # number of cells in each cell group

table(cellchat@idents)
##  Naive CD4 T Memory CD4 T   CD14+ Mono            B        CD8 T FCGR3A+ Mono 
##          697          483          480          344          271          162 
##           NK           DC     Platelet 
##          155           32           14

导入配受体数据库

CellChat提供了人和小鼠的配受体数据库,
分别可以用CellChatDB.human,CellChatDB.mouse来导入。
来看一下这个数据库的结构。

CellChatDB <- CellChatDB.human 
str(CellChatDB)
## List of 4
##  $ interaction:'data.frame': 2005 obs. of  11 variables:
##   ..$ interaction_name  : chr [1:2005] "TGFB1_TGFBR1_TGFBR2" "TGFB2_TGFBR1_TGFBR2" "TGFB3_TGFBR1_TGFBR2" "TGFB1_ACVR1B_TGFBR2" ...
##   ..$ pathway_name      : chr [1:2005] "TGFb" "TGFb" "TGFb" "TGFb" ...
##   ..$ ligand            : chr [1:2005] "TGFB1" "TGFB2" "TGFB3" "TGFB1" ...
##   ..$ receptor          : chr [1:2005] "TGFbR1_R2" "TGFbR1_R2" "TGFbR1_R2" "ACVR1B_TGFbR2" ...
##   ..$ agonist           : chr [1:2005] "TGFb agonist" "TGFb agonist" "TGFb agonist" "TGFb agonist" ...
##   ..$ antagonist        : chr [1:2005] "TGFb antagonist" "TGFb antagonist" "TGFb antagonist" "TGFb antagonist" ...
##   ..$ co_A_receptor     : chr [1:2005] "" "" "" "" ...
##   ..$ co_I_receptor     : chr [1:2005] "TGFb inhibition receptor" "TGFb inhibition receptor" "TGFb inhibition receptor" "TGFb inhibition receptor" ...
##   ..$ evidence          : chr [1:2005] "KEGG: hsa04350" "KEGG: hsa04350" "KEGG: hsa04350" "PMID: 27449815" ...
##   ..$ annotation        : chr [1:2005] "Secreted Signaling" "Secreted Signaling" "Secreted Signaling" "Secreted Signaling" ...
##   ..$ interaction_name_2: chr [1:2005] "TGFB1 - (TGFBR1+TGFBR2)" "TGFB2 - (TGFBR1+TGFBR2)" "TGFB3 - (TGFBR1+TGFBR2)" "TGFB1 - (ACVR1B+TGFBR2)" ...
##  $ complex    :'data.frame': 154 obs. of  4 variables:
##   ..$ subunit_1: chr [1:154] "INHBA" "INHA" "INHA" "IL12A" ...
##   ..$ subunit_2: chr [1:154] "INHBB" "INHBA" "INHBB" "IL12B" ...
##   ..$ subunit_3: chr [1:154] "" "" "" "" ...
##   ..$ subunit_4: chr [1:154] "" "" "" "" ...
##  $ cofactor   :'data.frame': 31 obs. of  16 variables:
##   ..$ cofactor1 : chr [1:31] "FST" "BAMBI" "TIE1" "PTPRB" ...
##   ..$ cofactor2 : chr [1:31] "" "" "" "" ...
##   ..$ cofactor3 : chr [1:31] "" "" "" "" ...
##   ..$ cofactor4 : chr [1:31] "" "" "" "" ...
##   ..$ cofactor5 : chr [1:31] "" "" "" "" ...
##   ..$ cofactor6 : chr [1:31] "" "" "" "" ...
##   ..$ cofactor7 : chr [1:31] "" "" "" "" ...
##   ..$ cofactor8 : chr [1:31] "" "" "" "" ...
##   ..$ cofactor9 : chr [1:31] "" "" "" "" ...
##   ..$ cofactor10: chr [1:31] "" "" "" "" ...
##   ..$ cofactor11: chr [1:31] "" "" "" "" ...
##   ..$ cofactor12: chr [1:31] "" "" "" "" ...
##   ..$ cofactor13: chr [1:31] "" "" "" "" ...
##   ..$ cofactor14: chr [1:31] "" "" "" "" ...
##   ..$ cofactor15: chr [1:31] "" "" "" "" ...
##   ..$ cofactor16: chr [1:31] "" "" "" "" ...
##  $ geneInfo   :'data.frame': 41787 obs. of  6 variables:
##   ..$ Symbol         : chr [1:41787] "A1BG" "A1BG-AS1" "A1CF" "A2M" ...
##   ..$ Name           : chr [1:41787] "alpha-1-B glycoprotein" "A1BG antisense RNA 1" "APOBEC1 complementation factor" "alpha-2-macroglobulin" ...
##   ..$ EntrezGene.ID  : int [1:41787] 1 503538 29974 2 144571 144568 NA NA 3 127550 ...
##   ..$ Ensembl.Gene.ID: chr [1:41787] "ENSG00000121410" "ENSG00000268895" "ENSG00000148584" "ENSG00000175899" ...
##   ..$ MGI.ID         : chr [1:41787] "MGI:2152878" "" "MGI:1917115" "MGI:2449119" ...
##   ..$ Gene.group.name: chr [1:41787] "Immunoglobulin like domain containing" "Antisense RNAs" "RNA binding motif containing" "C3 and PZP like, alpha-2-macroglobulin domain containing" ...
out3 <- capture.output(str(CellChatDB))
out4 <- paste(out3, collapse="\n")
mm(gsub("\\$","# ",gsub("\\.\\. ","#",out4)),type ="text")
#这个数据库的信息是很全面的:
colnames(CellChatDB$interaction)
##  [1] "interaction_name"   "pathway_name"       "ligand"            
##  [4] "receptor"           "agonist"            "antagonist"        
##  [7] "co_A_receptor"      "co_I_receptor"      "evidence"          
## [10] "annotation"         "interaction_name_2"
CellChatDB$interaction[1:4,1:4]#考虑了多聚体
##                        interaction_name pathway_name ligand      receptor
## TGFB1_TGFBR1_TGFBR2 TGFB1_TGFBR1_TGFBR2         TGFb  TGFB1     TGFbR1_R2
## TGFB2_TGFBR1_TGFBR2 TGFB2_TGFBR1_TGFBR2         TGFb  TGFB2     TGFbR1_R2
## TGFB3_TGFBR1_TGFBR2 TGFB3_TGFBR1_TGFBR2         TGFb  TGFB3     TGFbR1_R2
## TGFB1_ACVR1B_TGFBR2 TGFB1_ACVR1B_TGFBR2         TGFb  TGFB1 ACVR1B_TGFbR2
head(CellChatDB$cofactor)
##                             cofactor1 cofactor2 cofactor3 cofactor4 cofactor5
## ACTIVIN antagonist                FST                                        
## ACTIVIN inhibition receptor     BAMBI                                        
## ANGPT inhibition receptor 1      TIE1                                        
## ANGPT inhibition receptor 2     PTPRB                                        
## BMP antagonist                   NBL1     GREM1     GREM2      CHRD       NOG
## BMP inhibition receptor         BAMBI                                        
##                             cofactor6 cofactor7 cofactor8 cofactor9 cofactor10
## ACTIVIN antagonist                                                            
## ACTIVIN inhibition receptor                                                   
## ANGPT inhibition receptor 1                                                   
## ANGPT inhibition receptor 2                                                   
## BMP antagonist                   BMP3    LEFTY1    LEFTY2                     
## BMP inhibition receptor                                                       
##                             cofactor11 cofactor12 cofactor13 cofactor14
## ACTIVIN antagonist                                                     
## ACTIVIN inhibition receptor                                            
## ANGPT inhibition receptor 1                                            
## ANGPT inhibition receptor 2                                            
## BMP antagonist                                                         
## BMP inhibition receptor                                                
##                             cofactor15 cofactor16
## ACTIVIN antagonist                               
## ACTIVIN inhibition receptor                      
## ANGPT inhibition receptor 1                      
## ANGPT inhibition receptor 2                      
## BMP antagonist                                   
## BMP inhibition receptor
head(CellChatDB$complex)
##              subunit_1 subunit_2 subunit_3 subunit_4
## Activin AB       INHBA     INHBB                    
## Inhibin A         INHA     INHBA                    
## Inhibin B         INHA     INHBB                    
## IL12AB           IL12A     IL12B                    
## IL23 complex     IL12B     IL23A                    
## IL27 complex      IL27      EBI3
head(CellChatDB$geneInfo)
##              Symbol                           Name EntrezGene.ID
## HGNC:5         A1BG         alpha-1-B glycoprotein             1
## HGNC:37133 A1BG-AS1           A1BG antisense RNA 1        503538
## HGNC:24086     A1CF APOBEC1 complementation factor         29974
## HGNC:7          A2M          alpha-2-macroglobulin             2
## HGNC:27057  A2M-AS1            A2M antisense RNA 1        144571
## HGNC:23336    A2ML1   alpha-2-macroglobulin like 1        144568
##            Ensembl.Gene.ID      MGI.ID
## HGNC:5     ENSG00000121410 MGI:2152878
## HGNC:37133 ENSG00000268895            
## HGNC:24086 ENSG00000148584 MGI:1917115
## HGNC:7     ENSG00000175899 MGI:2449119
## HGNC:27057 ENSG00000245105            
## HGNC:23336 ENSG00000166535            
##                                                     Gene.group.name
## HGNC:5                        Immunoglobulin like domain containing
## HGNC:37133                                           Antisense RNAs
## HGNC:24086                             RNA binding motif containing
## HGNC:7     C3 and PZP like, alpha-2-macroglobulin domain containing
## HGNC:27057                                           Antisense RNAs
## HGNC:23336 C3 and PZP like, alpha-2-macroglobulin domain containing

其实是记录了许多许多受配体相关的通路信息,不像有的配受体库只有一个基因对。
这样,我们就可以更加扎实地把脚落到pathway上面了。
在CellChat中,我们还可以先择特定的信息描述细胞间的相互作者,
这个可以理解为从特定的侧面来刻画细胞间相互作用,比用一个大的配体库又精细了许多呢。

CellChatDB.use <- subsetDB(CellChatDB, search = "Secreted Signaling") # use Secreted Signaling for cell-cell communication analysis
cellchat@DB <- CellChatDB.use # set the used database in the object
unique(CellChatDB$interaction$annotation)

## [1] "Secreted Signaling" "ECM-Receptor"       "Cell-Cell Contact"

预处理(速度慢)

对表达数据进行预处理,用于细胞间的通信分析。
首先在一个细胞组中识别过表达的配体或受体,
然后将基因表达数据投射到蛋白-蛋白相互作用(PPI)网络上。
如果配体或受体过表达,则识别过表达配体和受体之间的相互作用。

cellchat <- subsetData(cellchat) # subset the expression data of signaling genes for saving computation cost
future::plan("multiprocess", workers = 4) # do parallel  
cellchat <- identifyOverExpressedGenes(cellchat)
cellchat <- identifyOverExpressedInteractions(cellchat)
cellchat <- projectData(cellchat, PPI.human)  

相互作用推断

我们通过为每个相互作用分配一个概率值并进行置换检验来推断生物意义上的细胞-细胞通信。

cellchat <- computeCommunProb(cellchat)  
#较慢,约3min

推测细胞间在信号通路水平上的通讯。我们还通过计算与每个信号通路相关的所有配体-受体相互作用的通信概率来推断信号通路水平上的通信概率。
注:推测的每个配体-受体对的细胞间通信网络和每个信号通路分别存储在“net”和“netP”槽中。
我们可以通过计算链路的数量或汇总通信概率来计算细胞间的聚合通信网络。

cellchat <- computeCommunProbPathway(cellchat)
cellchat <- aggregateNet(cellchat)

让我们看看这结果。

cellchat@netP$pathways
##  [1] "TGFb"       "NRG"        "PDGF"       "CCL"        "CXCL"      
##  [6] "MIF"        "IL2"        "IL6"        "IL10"       "IL1"       
## [11] "CSF"        "IL16"       "IFN-II"     "LT"         "LIGHT"     
## [16] "FASLG"      "TRAIL"      "BAFF"       "CD40"       "VISFATIN"  
## [21] "COMPLEMENT" "PARs"       "FLT3"       "ANNEXIN"    "GAS"       
## [26] "GRN"        "GALECTIN"   "BTLA"       "BAG"
head(cellchat@LR$LRsig)
##                        interaction_name pathway_name ligand      receptor
## TGFB1_TGFBR1_TGFBR2 TGFB1_TGFBR1_TGFBR2         TGFb  TGFB1     TGFbR1_R2
## TGFB1_ACVR1B_TGFBR2 TGFB1_ACVR1B_TGFBR2         TGFb  TGFB1 ACVR1B_TGFbR2
## TGFB1_ACVR1C_TGFBR2 TGFB1_ACVR1C_TGFBR2         TGFb  TGFB1 ACVR1C_TGFbR2
## TGFB1_ACVR1_TGFBR1   TGFB1_ACVR1_TGFBR1         TGFb  TGFB1   ACVR1_TGFbR
## WNT10A_FZD1_LRP5       WNT10A_FZD1_LRP5          WNT WNT10A     FZD1_LRP5
## WNT10A_FZD2_LRP5       WNT10A_FZD2_LRP5          WNT WNT10A     FZD2_LRP5
##                          agonist      antagonist           co_A_receptor
## TGFB1_TGFBR1_TGFBR2 TGFb agonist TGFb antagonist                        
## TGFB1_ACVR1B_TGFBR2 TGFb agonist TGFb antagonist                        
## TGFB1_ACVR1C_TGFBR2 TGFb agonist TGFb antagonist                        
## TGFB1_ACVR1_TGFBR1                                                      
## WNT10A_FZD1_LRP5     WNT agonist  WNT antagonist WNT activation receptor
## WNT10A_FZD2_LRP5     WNT agonist  WNT antagonist WNT activation receptor
##                                co_I_receptor                       evidence
## TGFB1_TGFBR1_TGFBR2 TGFb inhibition receptor                 KEGG: hsa04350
## TGFB1_ACVR1B_TGFBR2 TGFb inhibition receptor                 PMID: 27449815
## TGFB1_ACVR1C_TGFBR2 TGFb inhibition receptor                 PMID: 27449815
## TGFB1_ACVR1_TGFBR1                                           PMID: 29376829
## WNT10A_FZD1_LRP5     WNT inhibition receptor KEGG: hsa04310; PMID: 23209157
## WNT10A_FZD2_LRP5     WNT inhibition receptor KEGG: hsa04310; PMID: 23209159
##                             annotation      interaction_name_2
## TGFB1_TGFBR1_TGFBR2 Secreted Signaling TGFB1 - (TGFBR1+TGFBR2)
## TGFB1_ACVR1B_TGFBR2 Secreted Signaling TGFB1 - (ACVR1B+TGFBR2)
## TGFB1_ACVR1C_TGFBR2 Secreted Signaling TGFB1 - (ACVR1C+TGFBR2)
## TGFB1_ACVR1_TGFBR1  Secreted Signaling  TGFB1 - (ACVR1+TGFBR1)
## WNT10A_FZD1_LRP5    Secreted Signaling    WNT10A - (FZD1+LRP5)
## WNT10A_FZD2_LRP5    Secreted Signaling    WNT10A - (FZD2+LRP5)

可视化

在推断细胞-细胞通信网络的基础上,CellChat为进一步的探索、分析和可视化提供了各种功能。 通过结合社会网络分析、模式识别和多种学习方法的综合方法,t可以定量地描述和比较推断出的细胞-细胞通信网络。
它提供了一个易于使用的工具来提取和可视化推断网络的高阶信息。例如,它可以随时预测所有细胞群的主要信号输入和输出,以及这些细胞群和信号如何协调在一起实现功能。
你可以使用层次图或圈图可视化每个信号通路。 如果使用层次图可视化通信网络,请定义vertex.receiver,它是一个数字向量,给出作为第一个层次结构图中的目标的细胞组的索引。我们可以使用netVisual_aggregate来可视化信号路径的推断通信网络,并使用netVisual_individual来可视化与该信号路径相关的单个L-R对的通信网络。
在层次图中,实体圆和空心圆分别表示源和目标。圆的大小与每个细胞组的细胞数成比例。边缘颜色与信源一致。线越粗,信号越强。这里我们展示了一个MIF信号网络的例子。所有显示重要通信的信令路径都可以通过cellchat@netP$pathways访问。

cellchat@netP$pathways
##  [1] "TGFb"       "NRG"        "PDGF"       "CCL"        "CXCL"      
##  [6] "MIF"        "IL2"        "IL6"        "IL10"       "IL1"       
## [11] "CSF"        "IL16"       "IFN-II"     "LT"         "LIGHT"     
## [16] "FASLG"      "TRAIL"      "BAFF"       "CD40"       "VISFATIN"  
## [21] "COMPLEMENT" "PARs"       "FLT3"       "ANNEXIN"    "GAS"       
## [26] "GRN"        "GALECTIN"   "BTLA"       "BAG"
levels(cellchat@idents) 
## [1] "Naive CD4 T"  "Memory CD4 T" "CD14+ Mono"   "B"            "CD8 T"       
## [6] "FCGR3A+ Mono" "NK"           "DC"           "Platelet"
vertex.receiver = seq(1,4) # a numeric vector
# check the order of cell identity to set suitable vertex.receiver
#cellchat@LR$LRsig$pathway_name
#cellchat@LR$LRsig$antagonist
pathways.show <- "MIF"
netVisual_aggregate(cellchat, signaling = pathways.show,  vertex.receiver = vertex.receiver, vertex.size = groupSize)   
![image.png](https://upload-images.jianshu.io/upload_images/19009296-67735d7121aafe66.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
netVisual_aggregate(cellchat, signaling = pathways.show, layout = "circle", vertex.size = groupSize)

计算和可视化每个配体-受体对整个信号通路的贡献度。

netAnalysis_contribution(cellchat, signaling = pathways.show)

识别细胞群的信号转导作用,通过计算每个细胞群的网络中心性指标,
CellChat允许随时识别细胞间通信网络中的主要发送者、接收者、调解者和影响者。

cellchat <- netAnalysis_signalingRole(cellchat, slot.name = "netP") # the slot 'netP' means the inferred intercellular communication network of signaling pathways
netVisual_signalingRole(cellchat, signaling = pathways.show, width = 12, height = 2.5, font.size = 10)
dev.off()

识别特定细胞群的全局通信模式和主要信号。除了探索单个通路的详细通讯外,一个重要的问题是多个细胞群和信号通路如何协调运作。CellChat采用模式识别方法来识别全局通信模式以及每个小群的关键信号。
识别分泌细胞外向交流模式。随着模式数量的增加,可能会出现冗余的模式,使得解释通信模式变得困难。我们选择了5种模式作为默认模式。一般来说,当模式的数量大于2时就可以认为具有生物学意义。

nPatterns = 5
cellchat <- identifyCommunicationPatterns(cellchat, pattern = "outgoing", k = nPatterns)
# river plot
netAnalysis_river(cellchat, pattern = "outgoing")
# dot plot
netAnalysis_dot(cellchat, pattern = "outgoing")

参考
CellChat:细胞间相互作用分析利器
[Inference and analysis of cell-cell communication using CellChat
Suoqin Jin, Christian F. Guerrero-Juarez, Lihua Zhang, Ivan Chang, Peggy Myung, Maksim V. Plikus, Qing Nie
bioRxiv 2020.07.21.214387] (https://doi.org/10.1101/2020.07.21.214387)

你可能感兴趣的:(使用cellchat进行细胞间通讯分析)