Entering edit mode
Hello,
I'm running this code to get the fitted log-CPM values after running voomLmFit, but it doesn't work.
v <- voomLmFit(y, modsv, block = samples$clone, keep.EList = TRUE)
cpm.fit.tab <- cpm(v, normalized.lib.sizes=TRUE)
Error in min(y) : invalid 'type' (list) of argument
I suspect I get the error because CPM function works with DGEList. Looking at the output voomLmFit has EList. Does EList contain the fitted log-CPM values? If not, can you please recommend how to get the fitted log-CPM values from the object generated by voomLmFit?
Thanks,
Is the output from fitted(v) in the log2 CPM scale? or CPM scale?
The fitted values are on the log2CPM scale. I would have told you if they were not!
I think you may be getting confused by the differences between limma and edgeR. voomLmFit() produces a limma fitted model object so, if you use it, then you must use limma functions for the downstream analysis. In limma, expression is always on the log2-scale. If you want to use edgeR downstream functions such as cpm(), then use glmQLFit() instead of voomLmFit(). That will create an edgeR fitted model object instead a limma object.