0

I made a plot that shows median expression of some markers across different cell populations. I made it using a Bioconductor package that is based on ggplot and the final result is a ggplot object. Here is the plot and I want to be able to show an analysis of variance between the conditions (so between "Ref" and "BCRXL") for every antigen within every cell type. I was thinking I could use ggpubr since my plot is ggplot based, but I'm having difficulty.

p <- plotMedExprs(sce, k = "merging1", 
    facet_by = "cluster_id", shape_by = "patient_id")
p$facet$params$ncol <- 2
p

I know this is a complex plot, but any help would be appreciated! :)

Cam
  • 1
  • 1
  • 2
  • 1
    While ggplot2 has some build-in tools for building models in `geom_smooth()`, it is generally not the recommended way to model something more complicated than a trendline. I suspect you'd have an easier time building models outside the plotting system. – teunbrand Mar 16 '22 at 20:06
  • 100% agree with @teunbrand. you have some nuances in the data like paired observations, non-equal variances and lots and lots of potential tests. – George Savva Mar 16 '22 at 20:10
  • @teunbrand Thank you, that's good to know! Are there any packages you could recommend to get start with these tests? – Cam Mar 16 '22 at 21:14
  • Even though I also work in biology, immunology is not my field so I don't know what the data generative process is, nor what the field's conventions are. If this is a pure statistics question, you might have better luck over at [cross validated](https://stats.stackexchange.com/). Otherwise, I'd look for some literature on how people with similar data have analysed it. – teunbrand Mar 16 '22 at 21:19

0 Answers0