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

你可能感兴趣的:(ggsignif箱线图添加显著性差异标识(多组分析))