每周文献研读

seraut自带函数的一点点小技巧

2021-01-26  本文已影响0人  碌碌无为的杰少

我是用seraut自带函数作图的,当然很多人用ggplot做的更好看,再次提醒有人会用ggplot调好色的代码,记得简书发给我,我就用很蠢的自带函数作图。

VlnPlot(experiment.aggregate, features = "SDC1",group.by = "celltype3")
图片.png

选取大于0的

VlnPlot(subset(experiment.aggregate,SDC1>0), features = "SDC1",group.by = "celltype3")
图片.png

叠加

Idents(experiment.aggregate) <- "celltype3"
markers <- c('IGHM','FCER2','IL4R','CD27','SUGCT','LRMP','SDC1','CD38','JCHAIN')
markers <- CaseMatch(markers, rownames(experiment.aggregate))
B2 <- VlnPlot(experiment.aggregate, features = markers, pt.size = 0, stack = T)+
  ggsci::scale_fill_jco()
图片.png

换位置

Idents(experiment.aggregate) <- "celltype3"
markers <- c('IGHM','FCER2','IL4R','CD27','SUGCT','LRMP','CD38','SDC1','JCHAIN')
markers <- CaseMatch(markers, rownames(experiment.aggregate))
group_list <- factor(experiment.aggregate@meta.data$celltype3,levels = c('IGG+ B cells','IGA+ B cells','GC B cells','Memory B cells','Naive B cells'))
experiment.aggregate@meta.data$celltype4 <- group_list 
B2 <- VlnPlot(experiment.aggregate, features = markers, pt.size = 0, stack = T,group.by = 'celltype4')+
  ggsci::scale_fill_jco()
图片.png
上一篇下一篇

猜你喜欢

热点阅读