I am trying to make a count plot from RNA-seq data for individual genes. I am only interested in the comparisons between each treatment and the control group and my data are paired, so I'm trying to show this. I have managed to make the graph on the left (Counts of single gene) by using the plotCounts function of DEseq2 and then modify the graph a bit. The code is the following:
data <- plotCounts(dds, gene="GB41122", intgroup=c("Treatment", "Home", "Behaviour"), returnData=TRUE)
data <- ggplot(data, aes(x=Treatment, y=count, shape = Behaviour, color=Home, group=Home)) +
scale_y_log10() +
geom_point() + geom_line()
How could this be modified so that the graph looks like the one to the right?
Also, how can I reorder the treatment levels so that I have ctr to the left, then CO1 and CO2 to the right?
Thank you! Andrea