這篇文章在2020年7月上傳到了bioRxiv(Inference and analysis of cell-cell communication using CellChat景东,https://www.biorxiv.org/content/10.1101/2020.07.21.214387v1.full
在這個(gè)工作中炊琉,作者構(gòu)建了一個(gè)配體掂名,受體及其輔因子之間相互作用的數(shù)據(jù)庫斩萌,該數(shù)據(jù)庫可準(zhǔn)確表示已知的異聚分子復(fù)合物面粮。并且作者開發(fā)了CellChat的一個(gè)R包尤筐,該工具能夠從單細(xì)胞RNA測序(scRNA-seq)數(shù)據(jù)定量推斷和分析細(xì)胞間通訊網(wǎng)絡(luò)鸟悴。
在這之前幅虑,已經(jīng)開發(fā)了的幾種從scRNA-seq數(shù)據(jù)推斷細(xì)胞之間的通信的方法文兑,例如cellphoneDB,celltalker,iTALK和NicheNet盒刚。作者認(rèn)為,之前的方法主要關(guān)注點(diǎn)是單一的配體受體绿贞,而事實(shí)上很多生物學(xué)功能是基于受體復(fù)合體因块。
總結(jié)下來,作者覺得當(dāng)前現(xiàn)有數(shù)據(jù)庫或工具的其他局限性包括:
a)缺乏系統(tǒng)地將配體-受體對分類為功能相關(guān)的信號通路的方法籍铁;
b)自分泌和旁分泌信號相互作用的直觀可視化涡上;
c)分析復(fù)雜小區(qū)間通信的系統(tǒng)方法;
d)鑒于細(xì)胞之間的生物變異性可以是離散的也可以是連續(xù)的拒名,因此能夠針對連續(xù)的細(xì)胞狀態(tài)軌跡訪問信號串?dāng)_吩愧。
作者開發(fā)的資源包括:
數(shù)據(jù)庫http://www.cellchat.org/
工具包https://github.com/sqjin/CellChat
實(shí)操
1.安裝
##R安裝依賴包:
NMF(https://github.com/sqjin/NMF),
devtools::install_github("sqjin/NMF")
ComplexHeatmap(https://github.com/jokergoo/ComplexHeatmap)
BiocManager::install("ComplexHeatmap", update = F)
##python安裝umap
pip install umap-learn
##R安裝CellChat
devtools::install_github("sqjin/CellChat")
2.Seurat對象Demo已經(jīng)定義了細(xì)胞類型增显,并以cellType的meta.data形式存在
#加載需要的R包
library(CellChat)
library(ggplot2)
library(ggalluvial)
library(Seurat)
3.創(chuàng)建cellchat對象
cellchat <- createCellChat(Demo@assays$RNA@data)
meta <- data.frame(cellType = Demo$cellType, row.names = Cells(Demo))
cellchat <- addMeta(cellchat, meta = meta, meta.name = "cellType")
cellchat <- setIdent(cellchat, ident.use = "cellType") # set "labels" as default cell identity
groupSize <- as.numeric(table(cellchat@idents)) # number of cells in each cell group
4.加載與設(shè)定需要的CellChatDB數(shù)據(jù)庫
CellChatDB <- CellChatDB.human
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
5.預(yù)處理表達(dá)數(shù)據(jù)以進(jìn)行細(xì)胞間相互作用分析
identifyOverExpressedGenes這步在Rstudio server里測試有bug雁佳,但是在window本地運(yùn)行沒問題,估計(jì)是該函數(shù)與服務(wù)器暫時(shí)不兼容同云。
cellchat <- subsetData(cellchat) # subset the expression data of signaling genes for saving computation cost
cellchat <- identifyOverExpressedGenes(cellchat)
cellchat <- identifyOverExpressedInteractions(cellchat)
cellchat <- projectData(cellchat, PPI.human)
6.推斷細(xì)胞間相互作用網(wǎng)絡(luò)與分析
cellchat <- computeCommunProb(cellchat)
cellchat <- computeCommunProbPathway(cellchat)
cellchat <- aggregateNet(cellchat)
cellchat <- netAnalysis_signalingRole(cellchat, slot.name = "netP")
netAnalysis_contribution(cellchat, signaling = pathways.show)# Compute and visualize the contribution of each ligand-receptor pair to the overall signaling pathway
7.可視化
pathways.show <- c("TGFb")
vertex.receiver = seq(1,9) # a numeric vector
netVisual_aggregate(cellchat, signaling = pathways.show, vertex.receiver = vertex.receiver, vertex.size = groupSize) # Hierarchy plot
netVisual_aggregate(cellchat, signaling = pathways.show, layout = "circle", vertex.size = groupSize) # Circle plot
netVisual_signalingRole(cellchat, signaling = pathways.show) #Visualize the signaling roles of cell groups
nPatterns = 5
cellchat <- identifyCommunicationPatterns(cellchat, pattern = "outgoing", k = nPatterns)
netAnalysis_river(cellchat, pattern = "outgoing") # river plot
netAnalysis_dot(cellchat, pattern = "outgoing") # dot plot
cellchat <- identifyCommunicationPatterns(cellchat, pattern = "incoming", k = nPatterns)
netAnalysis_river(cellchat, pattern = "incoming") # river plot
netAnalysis_dot(cellchat, pattern = "incoming") # dot plot
幾個(gè)好用的tips
Tip1:color.use參數(shù)設(shè)置
比如糖权,Demo_color是存放的對不同細(xì)胞類型的配色,屬性是一個(gè)named vector
那么在cellchat中梢杭,一般可視化的函數(shù)里面可以直接用 color.use = Demo_color
但是對于netVisual_signalingRole這個(gè)函數(shù)温兼,需要設(shè)置 color.use = Demo_colors[names(cellchat@netPTGFb$outdeg)]
Tip2:看特定信號中所有L-R的作用網(wǎng)絡(luò)
netVisual_individual(cellchat, signaling = path, layout = "circle", vertex.size = groupSize)
Tip3:圖片存為pdf過程會出現(xiàn)的invalid font type
原因:作者把a(bǔ)rial作為main font,當(dāng)R沒有這個(gè)字體的時(shí)候武契,就會報(bào)錯(cuò)
解決方法:
1.先下載Arial字體的TrueType Font文件
2.install.packages('extrafont')
3.font_import()
4.loadfonts(device = "pdf", quiet = F)