Hi All,
I'd like to create a Violin plot of my single cell data split by experimental group with pvalues calculated between each group. Like this example here
So far I have the following plot using this code
VlnPlot(seurat_obj,features = "Seurat_module_Score1", group.by = "celltype",split.by = "exp_group",pt.size = 0,split.plot = T,cols=brewer.pal(n=8,name = "Accent"))
I've tried stat_comapare_means and the ggsignif package, but they give me pvalues between the groups in the x-axis and not between the splits. Appreciate any help here.
Thanks
That's what i did. Do a ttest and add that as a label. But I was just wondering if there is a ggplot function to do the same like ggpubr or ggsignif does.
I usually just add it in as another geom, via
gp <- gp + geom_label(aes(x=celltype, y=ypos, label=signif), data=signif_df)
where
signif.df
might look like