04.寻找所有亚群的差异基因并输出

为方便注释时查看,及文章发表时上传补充材料。对所有亚群的marker基因进行文件输出

rm(list = ls())
library(Seurat)
library(dplyr)
load(file = 'pbmc-noann.rdata')
pbmc=sce
pbmc.markers <- FindAllMarkers(pbmc, only.pos = TRUE, min.pct = 0.25, logfc.threshold = 0.25)
pbmc.markers %>%
  group_by(cluster) %>%
  slice_max(n = 2, order_by = avg_log2FC)
write.table(pbmc.markers,file="all_markers.txt",quote=F,sep="\t",row.names=F,col.names=T)

image

参考来源:
生信技能树单细胞公开课

鸣谢:
I thank Dr.Jianming Zeng(University of Macau), and all the members of his bioinformatics team, biotrainee, for generously sharing their experience and codes.

问题交流:
Email: [email protected]

你可能感兴趣的:(04.寻找所有亚群的差异基因并输出)