作者:ahworld
鏈接:細胞通訊-iTALK使用方法
來源:微信公眾號-seqyuan
著作權歸作者所有,任何形式的轉載都請聯系作者。
什么是細胞通訊?
多細胞生物由不同類型的細胞組成,單個細胞之間的行為協調需要建立通訊網絡。例如生物體的生長發育、分化、各種組織器官的形成、維持以及各種生理活動的協調,都需要高效和高精度的細胞通訊機制。
信號轉導(signal transduction)強調信號的接收與接收后信號轉換的方式和結果,包括配體與受體結合、第二信使的產生及其后的級聯反應等,即信號的識別、轉移與轉換。
單細胞轉錄組分析中的細胞通訊分析主要指的就是:
通過比較不同樣品組的細胞在各細胞類型之間的配體與受體基因表達差異
單細胞“配體-受體”分析工具
1. CellPhoneDB
CellPhoneDB包含一個配體-受體數據庫,考慮了配體和受體的亞基結構,能夠準確地表示異質復合體。
可在線提交基因列表分析,CellPhoneDB會返回提交的基因列表中的配體-受體
基因配對。
2. celltalker
celltalker我們在《舉一反三 | 總結單細胞文章分析框架及軟件》中有提到。
3. iTALK
iTALK這個包的應用比較簡單,可以自定義定制的配體-受體數據庫。默認數據庫分析物種為人,如果我們做的事其他物種,可以匹配人的同源基因。本篇將對iTALK的使用做一個詳細介紹。
iTALK的使用方法
iTALK為R包,可通過以下方式安裝
devtools::install_github("Coolgenome/iTALK", build_vignettes = TRUE)
數據讀入
我們以Seurat的對象文件為例展示iTALK的數據載入
library(iTALK)
library(Seurat)
library(Matrix)
library(dplyr)
sdata <- readRDS(file = "~/Desktop/Seurat.rds")
# iTALK 要求的矩陣: 行為細胞,列為基因
iTalk_data <- as.data.frame(t(sdata@assays$RNA@counts))
# iTALK 要求包含cell_type列,我的細胞分群存儲在seurat_cluster
iTalk_data$cell_type <- sdata@meta.data$seurat_cluster
# iTALK 要求包含compare_group列(多樣本),表示每個細胞的生物學分組/樣本,我的細胞分組存放在Group
iTalk_data$compare_group <- sdata@meta.data$Group
unique(iTalk_data$cell_type)
# "cd56_nk" "cd14_monocytes" "b_cells" "cytotoxic_t" "regulatory_t" "memory_t" "naive_t"
unique(iTalk_data$compare_group)
# "group1" "group2" "group3"
配體-受體概覽
通過所有細胞的高表達基因分析其中包含的配體-受體
。
my10colors <- my36colors <-c('#E5D2DD', '#53A85F', '#F1BB72', '#F3B1A0', '#D6E7A3', '#57C3F3', '#476D87', '#E95C59', '#E59CC4', '#AB3282')
highly_exprs_genes <- rawParse(iTalk_data, top_genes=50, stats="mean")
# 通訊類型
comm_list<-c('growth factor','other','cytokine','checkpoint')
cell_types <- unique(iTalk_data$cell_type)
cell_col <- structure(my10colors[1:length(cell_types)], names=cell_types)
iTalk_res <- NULL
for(comm_type in comm_list){
res_cat <- FindLR(highly_exprs_genes, datatype='mean count', comm_type=comm_type)
iTalk_res <- rbind(iTalk_res, res_cat)
}
iTalk_res <- iTalk_res[order(iTalk_res$cell_from_mean_exprs*iTalk_res$cell_to_mean_exprs,decreasing=T),][1:20,]
NetView(iTalk_res,col=cell_col,vertex.label.cex=1,arrow.width=1,edge.max.width=5)
LRPlot(iTalk_res[1:20,],datatype='mean count',cell_col=cell_col,link.arr.lwd=iTalk_res$cell_from_mean_exprs[1:20],link.arr.width=iTalk_res$cell_to_mean_exprs[1:20])
樣本組之間的差異基因相關的配體-受體
deg_t<-DEG(iTalk_data %>% filter(cell_type=='regulatory_t'),method='DESeq2',contrast=c('group1', 'group2'))
deg_nk<-DEG(iTalk_data %>% filter(cell_type=='cd56_nk'),method='DESeq2',contrast=c('group1', 'group2'))
res<-NULL
for(comm_type in comm_list){
res_cat<-FindLR(deg_nk, deg_t, datatype='DEG',comm_type=comm_type)
#res_cat<-FindLR(deg_t, datatype='DEG',comm_type=comm_type)
res<-rbind(res,res_cat)
}
# FindLR DEG類型的數據,可以輸入一個基因集合,結果為相應基因內的配體-受體列表
# 如果有超過20組配體-受體結果,取前20進行展示
res<-res[order(res$cell_from_logFC*res$cell_to_logFC,decreasing=T),][1:20,]
LRPlot(res,datatype='DEG',cell_col=cell_col,link.arr.lwd=res$cell_from_logFC,link.arr.width=res$cell_to_logFC)
為了展示常用的Seurat對象文件作為iTALK的載入數據,我們把作者提供的測試數據轉換成了seurat對象。
鏈接:https://pan.baidu.com/s/1qM3pZwI_mXPZT3Cj9etWug 密碼:0rvp
可能由于測試數據集的原因,我并未找到樣本組不同亞群之間差異基因涉及到的受體配體,iTALK github issue有人遇到了相同的問題,作者暫未回應。
參考
https://github.com/Coolgenome/iTALK/blob/master/example/example_code.r