大家做單細胞項目的時候,會涉及到多個組別,在分群之后想進行不同組別的差異基因分析,來查看不同處理對試驗有什么影響。但生信小白只會流程化的分析,在對兩組之間的單細胞進行差異分析時,經(jīng)歷了好多挫折,其實Seurat包中自帶的Findmarker函數(shù)即可實現(xiàn)差異基因的分析。如下:
different_express_gene<- FindMarkers(seurat.obj,
group.by = "group",
logfc.threshold = 0.5,
test.use = "wilcox",
ident.1 = "test1",
ident.2 = "test2")
EnhancedVolcano (diff_gona,
lab=rownames(diff_gona),
x="avg_log2FC",
y="p_val_adj",
pCutoff=0.001,
FCcutoff=0.5,
pointSize=3.0,
title="6M VS 3M",
subtitle=NULL,
titleLabSize=15)+ theme(axis.text.x = element_text(color="black", size=12),
axis.text.y = element_text(color="black", size=12),
plot.title = element_text(hjust = 0.5))
以上就是簡單的差異基因分析并進行火山圖展示,大家可以利用得到的差異基因進行后續(xù)的富集分析。