Closed Maarten-vd-Sande closed 2 years ago
Hi! Have you tried to use ggplotify::as.grob()
on the MA plot?
Another one to try is cowplot::plot_grid()
directly on these objects.
Thanks for your reply. The issue is that it seems that DESeq2::plotMA
does not return anything, so I'm not sure how I can try to get it as.grob
or into the plot_grid
.
I'm not really sure if this is an deseq/geneplotter issue (as plotMA does not seem to return the plot) or a enhancedvolcano issue as it does not respect par.. :thinking:
Yep, anything based on ggplot2, like EnhancedVolcano, does not quite respect par()
.
Another function to try on plotMA()
is https://rdrr.io/cran/cowplot/man/as_grob.html
If all else fails, you can use EnhancedVolcano to generate an MA plot: https://www.biostars.org/p/457769/
Since the plotMA
never returns anything I don't know how to pass that to the as_grob
function. I'll go with the EnhancedMA way, since it's prettier than the deseq ma plot anyways :smile:
Thanks so much for answering my question
Thanks, yes, the plotMA()
function seems to behave in a strange way. I tried but failed to capture the output.
I'm trying to put your volcano plot and the deseq ma plot on the same figure. However I can't seem to get it to work. I'm relatively inexperienced with R, so I might be approaching this all wrong though :see_no_evil:
When I try with
par
enhancedvolcano takes over the whole figure, and seems not to respect that setting:I can't get it working with
gridExtra::grid.arrange
since the plotMA function does not return the grob. How would I get these plots next to each other in a single image?