library(clusterProfiler)
library(org.Mm.eg.db)
fibro.markers <- FindAllMarkers(fibro, only.pos = TRUE, min.pct = 0.25, logfc.threshold = 0.25)
fibro.markers1 <- subset(fibro.markers, p_val_adj<0.05)
ids=bitr(Endo.markers1$gene,'SYMBOL','ENTREZID','org.Mm.eg.db')
Endo.markers1=merge(Endo.markers1,ids,by.x='gene',by.y='SYMBOL')
gcSample=split(Endo.markers1$ENTREZID, Endo.markers1$cluster)
xx <- compareCluster(gcSample,
fun = "enrichGO",
OrgDb = "org.Mm.eg.db",
ont = "BP",
pAdjustMethod = "BH",
pvalueCutoff = 0.01,
qvalueCutoff = 0.05
)
p <- dotplot(xx,label_format=100)
p2 <- p + scale_color_continuous(low='#374E54', high='#DE8F44')
p2
cols = c("#DCDCDC", "#0172b6")
plot9 <- FeaturePlot(Bcells, features = c("Jchain","Ms4a1"),cols = cols, pt.size = 1)
plot9
# [富集分析] 4、clusterprofile富集分析--多组设计的富集及可视化