ggsignif箱线图添加显著性差异标识(多组分析)

library("ggsignif")
# geom_signif()
# compare_means(value ~ group, data = exprSet_L,method="wilcox.test", paired=FALSE)

my_comparisons <- list(c("T1","T2"), c("T1","T3"),c("T1", "T4"))
ggplot(exprSet_L,aes(group,value,fill=group))+
  geom_boxplot(width=0.5)+
  theme(plot.title=element_text(size = 25),axis.text.x=element_text(size=25,angle=0),axis.text.y=element_text(size=25),axis.title.x=element_text(size = 25),axis.title.y=element_text(size = 25))+
  labs(x=gene_name, y= 'Expression')+
  geom_signif(comparisons = my_comparisons,step_increase = 0.1,map_signif_level = F,test = t.test,size=2,textsize = 6)
# theme_set(theme_set(theme_bw(base_size=22)))
 # wilcox.test

  # geom_signif(mapping = NULL, data = NULL, stat = "signif",
  #             position = "identity", na.rm = FALSE, show.legend = NA,
  #             inherit.aes = TRUE, comparisons = NULL, test = "wilcox.test",
  #             test.args = NULL, annotations = NULL, map_signif_level = FALSE,
  #             y_position = NULL, xmin = NULL, xmax = NULL, margin_top = 0.05,
  #             step_increase = 0, tip_length = 0.03, size = 0.5, textsize = 3.88,
  #             family = "", vjust = 0, ...)

image.png
image.png
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容