跟着Cell学单细胞转录组分析(七):细胞亚群分析及细胞互作

想获取更多,请至公众号-KS科研分享与服务-

其实之前我们细胞的分群是很粗糙的,只是一个大概的方向,随着深入的研究,需要对特定细胞的更多亚群进行分析,这里我们选择免疫细胞进行分析,主要是为了跟随文章的脚步,也好完成后续一些示例,比如细胞互作,转录因子、拟时分析等。

首先提取免疫细胞群,然后跑一遍Seurat流程,重新聚类分群。


library(Seurat)
immune <- subset(scedata, celltype="="Immune")" immune <- scaledata(immune, vars.to.regress="c("nCount_RNA"," "percent.mt"), verbose="FALSE)" findvariablefeatures(immune, nfeatures="4000)" runpca(immune, npcs="50," findneighbors(immune, reduction="pca" , dims="1:50)" findclusters(immune, resolution="seq(from" = 0.1, to="1.0," by="0.2))" runumap(immune, library(clustree) clustree(immune) idents(immune) "rna_snn_res.0.5" immune$seurat_clusters immune@active.ident dimplot(immune, label="T,pt.size" 1) < code></->

跟着Cell学单细胞转录组分析(七):细胞亚群分析及细胞互作

查看下免疫细胞marker的表达。


immune_cellmarker <- c("cd3d",'cd3e','cd2',"cd4","cd8a",#t cell 'cd79a','mzb1','ms4a1','cd79b',#b 'foxp3',"il32",'tnfrsf18','tnfrsf4',#treg 'il17a','il17f','cd40lg',#th17 's100a8','cxcl8','sod2','nampt',#neutrophil 'sepp1','c1qa','apoe','cd14','rnase1',#macrophage 'tpsab1','tpsb2','cpa3','hpgds',#mast 'hla-dra','hla-dpb1','cst3','hla-dpa1',#mdc 'ptgds','sox4','gzmb','irf7',#pdc 'igha1','ighg1',"ighg2",#plasma 'klrf1','klrd1','xcl2','xcl1'#nk ) library(ggplot2) dotplot(immune, features="immune_cellmarker)+" theme_bw()+ theme(panel.grid="element_blank()," axis.text.x="element_text(hjust" = 1,vjust="0.5,angle=90))+" labs(x="NULL,y=NULL)+guides(size=guide_legend(order=3))+" scale_color_gradientn(values="seq(0,1,0.2),colours" c('#330066','#336699','#66cc66','#ffcc33')) < code></->

跟着Cell学单细胞转录组分析(七):细胞亚群分析及细胞互作

然后对细胞进行定群。


immune <- subset(immune, idents="c("1","8","9")," invert="TRUE)" new.cluster.ids <- c("0"="Macrophage" , "2"="T cell" "3"="Macrophage" "4"="mDC" "5"="Neutrophil" "6"="Macrophage" "7"="Macrophage" "10"="Mast" ) immune renameidents(immune, new.cluster.ids) immune$celltype immune@active.ident dimplot(immune, label="T,pt.size" = 1,group.by="celltype" < code></->

跟着Cell学单细胞转录组分析(七):细胞亚群分析及细胞互作

以上并不是新内容,亚群分析之后还可以和之前一样,做比例等。不过今天这里我们演示下细胞互作,用Cellcall这个比较简单的包。

=============================================

将GM和BM分开做互作,可以看看不同状态下细胞互作之间的区别。


library(devtools)
devtools::install_github("ShellyCoder/cellcall")
library(cellcall)
GM_immune <- subset(immune, group="="GM")" test <- createobject_fromseurat(seurat.object="GM_immune," #seurat对象 slot="counts" , cell_type="celltype" #细胞类型 data_source="UMI" scale.factor="10^6," org="Homo sapiens" ) #物种信息 mt transcommuprofile(object="test," pvaluecor="0.05," corvalue="0.1," toptargetcor="1," p.adjust="0.05," use.type="median" probs="0.9," method="mean" is_core="TRUE," #有多少细胞类型就设置多少个颜色 cell_color data.frame(color="c("#FF34B3","#BC8F8F","#20B2AA","#00F5FF","#FFA500")," stringsasfactors="FALSE)" rownames(cell_color) c("macrophage","t cell","mdc","neutrophil","mast") #绘制互作图 viewintercircos(object="mt," font="2," cellcolor="cell_color," lrcolor="c("#F16B6F"," "#84b1ed"), arr.type="big.arrow" ,arr.length="0.04," trackhight1="0.05," linkcolor.from.sender="TRUE," linkcolor="NULL," gap.degree="0.5," #细胞类型多的话设置小点,不然图太大画不出来 trackhight2="0.032," track.margin2="c(0.01,0.12)," diy="FALSE)" #可视化互作受配体关系 viewpheatmap(object="mt," show_rownames="T," show_colnames="T,treeheight_row=0," treeheight_col="10," cluster_rows="T,cluster_cols" = f,fontsize="12,angle_col" "45", main="score" < code></->

跟着Cell学单细胞转录组分析(七):细胞亚群分析及细胞互作

跟着Cell学单细胞转录组分析(七):细胞亚群分析及细胞互作

BM的互作结果为,变化还是挺大的。

跟着Cell学单细胞转录组分析(七):细胞亚群分析及细胞互作

跟着Cell学单细胞转录组分析(七):细胞亚群分析及细胞互作

除了这些,cellcall还可以做其他的事情,具体参考:

https://github.com/ShellyCoder/cellcall

做细胞互作的工具很多,比如iTALK,Cellchat,CellphoneDB等,感兴趣的可以自己取探索下。好了,今天的分享就到这里了,其实这篇分享不是很严谨,主要是演示单细胞数据进一步分析思路,希望对大家有启发。

Original: https://blog.csdn.net/qq_42090739/article/details/123416027
Author: TS的美梦
Title: 跟着Cell学单细胞转录组分析(七):细胞亚群分析及细胞互作

原创文章受到原创版权保护。转载请注明出处:https://www.johngo689.com/694062/

转载文章受原作者版权保护。转载请注明原作者出处!

(0)

大家都在看

亲爱的 Coder【最近整理,可免费获取】👉 最新必读书单  | 👏 面试题下载  | 🌎 免费的AI知识星球