Hi all,
I've been following the "RNA-seq analysis is easy as 1-2-3 with limma, Glimma and edgeR" vignette for usign limma on miRNA-seq data. I've gotten to the point of comparing the mean-variances pre- and post-filtering my data based on CPM counts.
I'm a bit bugged by the differences in x-axis labels between the plot generated by voom() and plotSA() and I'm trying to understand if they are the same thing. The y-axis at least was easy--sqrt(sigma) is the same as sqrt(standard deviation).
As far as I can tell from the manuals, the voom plot x-axis: log2( count size + 0.5) is based on log2(CPM +0.5), with the 0.5 being the offset to prevent taking log(0). That's fine. However, I assume what's plotted is the average of log2(CPM+0.5) over all of the samples? This isn't explicitly stated anywhere.
Similarly, I think the plotSA x-axis: Average log-expression is based on the $Amean values (e2fit$Amean in my code) which were generated from lmFit(), but I don't totally understand how they were calculated. Is it the average of log2(CPM)? was that 0.5 offset also included?
My goal is to relabel the x-axes to match if they actually represent the same thing so I can avoid confusion about why I'm comparing plots with 2 different things. If not, I want to understand how they're different so I can explain why they are still comparable. Thanks in advance.
par(mfrow=c(1,2))
v2 <- voom(y2, design, plot=TRUE)
v2fit <- lmFit(v2, design)
e2fit <- eBayes(v2fit)
plotSA(e2fit, main="Final model: Mean-variance trend", ylab = "Sqrt( standard deviation )")
You've included a code line
lines(predict(loess ...
but without showing the plot line produced by it. Could you please either delete the code or else show the output. The output isn't necessary for your question, so I suggest deleting.Thanks. This plot was saved prior to the loess line.